From 0766cda29e61cd5c63edf68ce6bc4d72efa34484 Mon Sep 17 00:00:00 2001 From: Zakhar Izmaylov Date: Sun, 17 Nov 2024 15:44:41 +0300 Subject: [PATCH] Fix start --- handlers/commands.py | 17 ----------------- handlers/start.py | 2 +- 2 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 handlers/commands.py diff --git a/handlers/commands.py b/handlers/commands.py deleted file mode 100644 index 09e38e8f..00000000 --- a/handlers/commands.py +++ /dev/null @@ -1,17 +0,0 @@ -from aiogram import Router, types -from aiogram.filters import Command -from aiogram.fsm.context import FSMContext - -from handlers.start import start_command - -router = Router() - - -@router.message(Command("start")) -async def handle_start(message: types.Message, state: FSMContext, admin: bool): - await start_command(message, admin) - - -@router.message(Command("menu")) -async def handle_menu(message: types.Message, state: FSMContext, admin: bool): - await start_command(message, admin) diff --git a/handlers/start.py b/handlers/start.py index beddb670..2b811289 100644 --- a/handlers/start.py +++ b/handlers/start.py @@ -56,7 +56,7 @@ async def send_welcome_message(chat_id: int, trial_status: int, admin: bool): ) -@router.message(Command("start")) +@router.message(Command("start"), Command("menu")) async def start_command(message: Message, admin: bool): logger.info(f"Received start command with text: {message.text}") if "referral_" in message.text: