1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

File support for states

File support. Now states can be saved in pickle file
This commit is contained in:
_run
2021-10-13 18:34:36 +05:00
parent 2113846567
commit 98044d6faa
4 changed files with 148 additions and 9 deletions

View File

@ -61,4 +61,8 @@ def age_incorrect(message):
bot.add_custom_filter(custom_filters.StateFilter(bot))
bot.add_custom_filter(custom_filters.IsDigitFilter())
# set saving states into file.
bot.enable_saving_states() # you can delete this if you do not need to save states
bot.infinity_polling(skip_pending=True)