Initial commit: UMB Telegram Bot
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import logging
|
||||
|
||||
from aiogram.types import BotCommand
|
||||
from bot.bot import bot
|
||||
|
||||
logger = logging.getLogger("setup_commands")
|
||||
|
||||
COMMANDS = [
|
||||
BotCommand(command="start", description="Запуск бота"),
|
||||
BotCommand(command="res", description="Исправить раскладку"),
|
||||
BotCommand(command="weather", description="Погода в городе"),
|
||||
BotCommand(command="ai", description="Спросить Астру"),
|
||||
BotCommand(command="aino", description="Заблокировать (админ)"),
|
||||
BotCommand(command="aiyes", description="Разблокировать (админ)"),
|
||||
BotCommand(command="ydf", description="Скачать с Яндекс.Диска"),
|
||||
]
|
||||
|
||||
|
||||
async def setup_bot_commands():
|
||||
try:
|
||||
await bot.set_my_commands(COMMANDS)
|
||||
logger.info("Меню команд установлено: %d команд", len(COMMANDS))
|
||||
except Exception as exc:
|
||||
logger.error("Не удалось установить меню команд: %s", exc)
|
||||
Reference in New Issue
Block a user