feat: register bot commands menu via set_my_commands
This commit is contained in:
parent
5bbd336f58
commit
2b56b98697
1 changed files with 9 additions and 0 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue