Update aiogram 3 template

This commit is contained in:
dj
2026-05-29 09:44:39 +03:00
parent e144cb1424
commit 2eced5dc4f
43 changed files with 1877 additions and 1252 deletions
+4 -4
View File
@@ -3,7 +3,7 @@ from aiogram import Router, Bot, F
from aiogram.filters import Command
from aiogram.types import Message
from tgbot.database.db_users import BaseModel as UserModel
from tgbot.database.db_users import UserModel
from tgbot.keyboards.reply_main import menu_frep
from tgbot.utils.const_functions import ded
from tgbot.utils.misc.bot_models import FSM, ARS
@@ -11,7 +11,7 @@ from tgbot.utils.misc.bot_models import FSM, ARS
router = Router(name=__name__)
# Main menu
# Главное меню пользователя
@router.message(F.text.in_(('menu', 'return', 'start')))
@router.message(Command(commands=['start']))
async def main_start(message: Message, bot: Bot, state: FSM, arSession: ARS, User: UserModel):
@@ -19,8 +19,8 @@ async def main_start(message: Message, bot: Bot, state: FSM, arSession: ARS, Use
await message.answer(
ded(f"""
🔸 Hello, {User.user_name}
🔸 Enter /start or /menu
🔸 Привет, {User.user_name}
🔸 Введи /start или /menu
"""),
reply_markup=menu_frep(message.from_user.id),
)