mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Added possibility to reset context on scene entered and to handle callback query in any state
This commit is contained in:
parent
ba3490363f
commit
e443e58daf
2 changed files with 35 additions and 7 deletions
|
|
@ -137,7 +137,12 @@ class NameScene(CancellableScene, state="name"):
|
|||
await self.wizard.update_data(name=message.text)
|
||||
|
||||
|
||||
class DefaultScene(Scene):
|
||||
class DefaultScene(
|
||||
Scene,
|
||||
reset_data_on_enter=True, # Reset state data
|
||||
reset_history_on_enter=True, # Reset history
|
||||
callback_query_without_state=True, # Handle callback queries even if user in any scene
|
||||
):
|
||||
"""
|
||||
Default scene for the bot.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue