Files
dzentra_bot/app/src/telegram/handlers/start.py

47 lines
1.1 KiB
Python

# app/src/telegram/handlers/start.py
from __future__ import annotations
from aiogram import F, Router
from aiogram.filters import Command
from aiogram.types import Message
from src.core.system_status import build_system_text
from src.telegram.keyboards.reply import build_main_menu_keyboard
from src.telegram.menus import MAIN_MENU_TEXT
router = Router(name="start")
@router.message(Command("start"))
async def cmd_start(message: Message) -> None:
await message.answer(
MAIN_MENU_TEXT,
reply_markup=build_main_menu_keyboard(),
)
@router.message(Command("menu"))
async def cmd_menu(message: Message) -> None:
await message.answer(
MAIN_MENU_TEXT,
reply_markup=build_main_menu_keyboard(),
)
@router.message(Command("help"))
async def cmd_help(message: Message) -> None:
await message.answer(
build_system_text(),
reply_markup=build_main_menu_keyboard(),
)
@router.message(F.text == "Меню")
async def menu_shortcut(message: Message) -> None:
await message.answer(
MAIN_MENU_TEXT,
reply_markup=build_main_menu_keyboard(),
)