diff --git a/docs/dispatcher/finite_state_machine/scene.rst b/docs/dispatcher/finite_state_machine/scene.rst index dfde1c09..98f73b8d 100644 --- a/docs/dispatcher/finite_state_machine/scene.rst +++ b/docs/dispatcher/finite_state_machine/scene.rst @@ -92,7 +92,7 @@ Also we need to define a handler that helps to start the quiz game: .. literalinclude:: ../../../examples/quiz_scene.py :language: python :caption: Start command handler - :lines: 251-253 + :lines: 260-262 Once the scene is defined, we need to register it in the SceneRegistry: @@ -155,7 +155,7 @@ Now we can run the bot and test the quiz game: .. literalinclude:: ../../../examples/quiz_scene.py :language: python :caption: Run the bot - :lines: 282- + :lines: 291- Complete them all diff --git a/examples/quiz_scene.py b/examples/quiz_scene.py index db7dd653..343fef75 100644 --- a/examples/quiz_scene.py +++ b/examples/quiz_scene.py @@ -260,7 +260,6 @@ class QuizScene(Scene, state="quiz"): quiz_router = Router(name=__name__) # Add handler that initializes the scene quiz_router.message.register(QuizScene.as_handler(), Command("quiz")) -quiz_router.include_scene(QuizScene) @quiz_router.message(Command("start")) diff --git a/tests/test_fsm/test_scene.py b/tests/test_fsm/test_scene.py index 1313301f..2bb2cf0a 100644 --- a/tests/test_fsm/test_scene.py +++ b/tests/test_fsm/test_scene.py @@ -30,7 +30,7 @@ from aiogram.fsm.scene import ( from aiogram.fsm.state import State, StatesGroup from aiogram.fsm.storage.base import StorageKey from aiogram.fsm.storage.memory import MemoryStorage, MemoryStorageRecord -from aiogram.types import Chat, Message, TelegramObject, Update +from aiogram.types import Chat, Message, Update from tests.mocked_bot import MockedBot