logs
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-03-29 09:08:37 +05:00
parent ad935c78d5
commit e4011db2fe

View File

@@ -34,18 +34,19 @@ 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}")
print(f"[DEBUG handle_callback] call.data repr: {repr(call.data)}")
timer_manager = dispatcher['timer_manager']
if call.data == "action_pomodoro":
if "pomodoro" in call.data:
await timer_manager.start_timer(call.from_user.id, 25*60, call.message.chat.id, 'Pomodoro')
await call.message.answer("Начался 25-минутный Pomodoro! 🔥")
elif call.data == "action_shortbreak":
elif "shortbreak" in call.data:
await timer_manager.start_timer(call.from_user.id, 5*60, call.message.chat.id, 'Short Break')
await call.message.answer("Начался 5-минутный перерыв ☕")
elif call.data == "action_longbreak":
elif "longbreak" in call.data:
await timer_manager.start_timer(call.from_user.id, 15*60, call.message.chat.id, 'Long Break')
await call.message.answer("Начался длинный перерыв 😌")
elif call.data == "action_stop":
elif "stop" in call.data:
await timer_manager.stop_timer(call.from_user.id)
await call.message.answer("Таймер остановлен ⏹")
await call.answer()