mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-21 22:56:38 +01:00
Clarified the last paragraph to make it more clear.
parent
89bc4ee174
commit
bcdba7d0db
1 changed files with 3 additions and 4 deletions
|
@ -22,8 +22,7 @@ To make your bot persistent you need to do the following.
|
|||
- Construct Updater with the persistence (`Updater('TOKEN', persistence=my_persistence, use_context=True)`)
|
||||
|
||||
This is enough to make `user_data`, `bot_data` and `chat_data` persistent.
|
||||
To make a conversationhandler persistent (save states between bot restarts)
|
||||
`ConversationHandler(<no change>, persistent=True, name='my_name')`
|
||||
If you want a conversationhandler to be persistent you **MUST NAME IT**. persistent is `False` by default.
|
||||
Adding these arguments and adding the conversationhandler to a persistence-aware updater/dispatcher will make it persistent.
|
||||
To make a conversation handler persistent (save states between bot restarts) you **must name it** and set `persistent` to `True`.
|
||||
Like `ConversationHandler(<no change>, persistent=True, name='my_name')`. `persistent` is `False` by default.
|
||||
Adding these arguments and adding the conversation handler to a persistence-aware updater/dispatcher will make it persistent.
|
||||
|
Loading…
Reference in a new issue