From bf3648b3082c73891043d4f5339128dd9899a945 Mon Sep 17 00:00:00 2001 From: Sergey Bahmatov Date: Fri, 28 Mar 2025 22:29:53 +0500 Subject: [PATCH] fix --- pomodoro_bot/bot.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pomodoro_bot/bot.py b/pomodoro_bot/bot.py index 0da5b80..8004fdc 100644 --- a/pomodoro_bot/bot.py +++ b/pomodoro_bot/bot.py @@ -11,12 +11,11 @@ API_TOKEN = os.getenv("BOT_TOKEN") bot = Bot(token=API_TOKEN) dp = Dispatcher(bot) - @dp.message_handler(commands=['start', 'help']) - async def send_welcome(message: Message): + + await message.reply("Привет! Я твой личный Pomodoro-бот. Выбирай действие:", reply_markup=menu_kb) - @dp.callback_query_handler(Text(equals=["pomodoro", "shortbreak", "longbreak", "stop"])) - async def handle_callback(call: types.CallbackQuery): + if call.data == "pomodoro": await timer_manager.start_timer(call.from_user.id, 25*60, call.message.chat.id, 'Pomodoro') await call.message.answer("Начался 25-минутный Pomodoro! 🔥")