generated from FOSS/Bot-Template
style: reformat imports, whitespace and line breaks across project
This commit is contained in:
@@ -8,13 +8,13 @@ from tgbot.utils.misc.bot_logging import bot_logger
|
||||
# Команды для обычных пользователей
|
||||
user_commands = [
|
||||
BotCommand(command="start", description="♻️ Перезапуск бота"),
|
||||
BotCommand(command="menu", description="🌀 Получение клавиатуры"),
|
||||
# BotCommand(command="menu", description="🌀 Получение клавиатуры"),
|
||||
]
|
||||
|
||||
# Команды для админов
|
||||
admin_commands = [
|
||||
BotCommand(command="start", description="♻️ Перезапуск бота"),
|
||||
BotCommand(command="menu", description="🌀 Получение клавиатуры"),
|
||||
# BotCommand(command="menu", description="🌀 Получение клавиатуры"),
|
||||
BotCommand(command="log", description="🖨 Получить логи"),
|
||||
]
|
||||
|
||||
@@ -28,6 +28,10 @@ async def set_commands(bot: Bot):
|
||||
|
||||
for admin in get_admins():
|
||||
try:
|
||||
await bot.set_my_commands(admin_commands, scope=BotCommandScopeChat(chat_id=admin))
|
||||
await bot.set_my_commands(
|
||||
admin_commands, scope=BotCommandScopeChat(chat_id=admin)
|
||||
)
|
||||
except Exception:
|
||||
bot_logger.warning("Не удалось обновить команды для админа %s", admin, exc_info=True)
|
||||
bot_logger.warning(
|
||||
"Не удалось обновить команды для админа %s", admin, exc_info=True
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user