mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Add enable_save_next_step_handlers and load_next_step_handlers methods to step_example/
Update: examples/step_example.py
This commit is contained in:
parent
1de356dcc3
commit
13df7b5908
@ -75,4 +75,14 @@ def process_sex_step(message):
|
||||
bot.reply_to(message, 'oooops')
|
||||
|
||||
|
||||
# Enable saving next step handlers to file "./.handlers-saves/step.save".
|
||||
# Delay=2 means that after any change in next step handlers (e.g. calling register_next_step_handler())
|
||||
# saving will hapen after delay 2 seconds.
|
||||
bot.enable_save_next_step_handlers(delay=2)
|
||||
|
||||
# Load next_step_handlers from save file (default "./.handlers-saves/step.save")
|
||||
# WARNING It will work only if enable_save_next_step_handlers was called!
|
||||
bot.load_next_step_handlers()
|
||||
|
||||
|
||||
bot.polling()
|
||||
|
Loading…
Reference in New Issue
Block a user