Fix account enrollment and operator callback flows with Redis scenarios
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
"""Explain unmatched input instead of silently dropping it or broadcasting it."""
|
||||
from aiogram import F, Router
|
||||
from aiogram.fsm.context import FSMContext
|
||||
from aiogram.types import Message
|
||||
from aiogram.types import Message, CallbackQuery
|
||||
|
||||
input_fallback_router = Router(name="input_fallback")
|
||||
|
||||
|
||||
@input_fallback_router.callback_query()
|
||||
async def unmatched_button(callback: CallbackQuery):
|
||||
await callback.answer("Кнопка устарела или недоступна. Откройте меню заново через /start.", show_alert=True)
|
||||
|
||||
|
||||
@input_fallback_router.message(F.text.lstrip().startswith("/"))
|
||||
async def unknown_command(message: Message):
|
||||
await message.answer("Команда не распознана или недоступна на этом шаге. /help — справка, /cancel — отменить текущий ввод.")
|
||||
|
||||
Reference in New Issue
Block a user