Fix start

This commit is contained in:
Zakhar Izmaylov
2024-11-17 15:53:31 +03:00
parent 545345a020
commit 0f0af0c194
3 changed files with 19 additions and 3 deletions
+2 -1
View File
@@ -11,7 +11,7 @@ storage = MemoryStorage()
dp = Dispatcher(bot=bot, storage=storage)
router = Router()
from handlers import coupons, donate, notifications, pay, profile, start
from handlers import commands, coupons, donate, notifications, pay, profile, start
from handlers.admin import admin_commands, admin_coupons, admin_panel, admin_user_editor
from handlers.instructions import instructions
from handlers.keys import key_management, keys
@@ -21,6 +21,7 @@ dp.include_router(admin_commands.router)
dp.include_router(admin_coupons.router)
dp.include_router(admin_panel.router)
dp.include_router(admin_user_editor.router)
dp.include_router(commands.router)
dp.include_router(coupons.router)
dp.include_router(start.router)
dp.include_router(profile.router)
+17
View File
@@ -0,0 +1,17 @@
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)
-2
View File
@@ -1,7 +1,6 @@
import os
from aiogram import F, Router
from aiogram.filters import Command
from aiogram.types import BufferedInputFile, CallbackQuery, InlineKeyboardButton, Message
from aiogram.utils.keyboard import InlineKeyboardBuilder
@@ -56,7 +55,6 @@ async def send_welcome_message(chat_id: int, trial_status: int, admin: bool):
)
@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: