This commit is contained in:
@@ -33,6 +33,7 @@ async def on_startup(dispatcher):
|
||||
|
||||
@dispatcher.callback_query_handler(lambda call: call.data.startswith("action_"))
|
||||
async def handle_callback(call: types.CallbackQuery):
|
||||
print(f"[DEBUG handle_callback] Received call.data: {call.data!r}")
|
||||
timer_manager = dispatcher['timer_manager']
|
||||
|
||||
if call.data == "action_pomodoro":
|
||||
@@ -49,5 +50,10 @@ async def on_startup(dispatcher):
|
||||
await call.message.answer("Таймер остановлен ⏹")
|
||||
await call.answer()
|
||||
|
||||
@dp.callback_query_handler()
|
||||
async def fallback_callback(call: types.CallbackQuery):
|
||||
print(f"[DEBUG fallback] Got unmatched callback: {call.data!r}")
|
||||
await call.answer("Команда не распознана.")
|
||||
|
||||
def run_bot():
|
||||
executor.start_polling(dp, skip_updates=True, on_startup=on_startup)
|
||||
executor.start_polling(dp, skip_updates=True, on_startup=on_startup)
|
||||
|
||||
Reference in New Issue
Block a user