GPQBot
10 строк · 330.0 Байт
1from pybotx import Bot, IncomingMessage, IncomingMessageHandlerFunc
2
3from app.resources.strings import CANCEL_COMMAND
4
5
6async def cancel_creation_middleware(
7message: IncomingMessage, bot: Bot, call_next: IncomingMessageHandlerFunc
8) -> None:
9if message.body == CANCEL_COMMAND:
10await message.state.fsm.drop_state()