25 lines
1022 B
Python
25 lines
1022 B
Python
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)
|