feat: register bot commands menu via set_my_commands

This commit is contained in:
Mikhail Putilovskij 2026-03-31 22:47:29 +03:00
parent 5bbd336f58
commit 2b56b98697

View file

@ -7,6 +7,7 @@ import os
import structlog
from aiogram import Bot, Dispatcher
from aiogram.fsm.storage.memory import MemoryStorage
from aiogram.types import BotCommand
from adapter.telegram import db
from adapter.telegram.handlers import auth, chat, confirm, settings
@ -92,6 +93,14 @@ async def main() -> None:
dp.include_router(settings.router)
dp.include_router(confirm.router)
await bot.set_my_commands([
BotCommand(command="start", description="Начать / восстановить сессию"),
BotCommand(command="new", description="Создать новый чат"),
BotCommand(command="chats", description="Список чатов"),
BotCommand(command="settings", description="Настройки"),
BotCommand(command="forum", description="Подключить Forum-группу"),
])
logger.info("Bot starting")
await dp.start_polling(bot)