diff --git a/app.py b/app.py index dc5a296..818fca7 100644 --- a/app.py +++ b/app.py @@ -3,8 +3,13 @@ from aiogram import executor from loader import dp import middlewares, filters, handlers from utils.notify_admins import on_startup_notify +from utils.set_bot_commands import set_default_commands + async def on_startup(dispatcher): + # Устанавливаем дефолтные команды + await set_default_commands(dispatcher) + # Уведомляет про запуск await on_startup_notify(dispatcher) diff --git a/utils/set_bot_commands.py b/utils/set_bot_commands.py new file mode 100644 index 0000000..d9143e3 --- /dev/null +++ b/utils/set_bot_commands.py @@ -0,0 +1,10 @@ +from aiogram import types + + +async def set_default_commands(dp): + await dp.bot.set_my_commands( + [ + types.BotCommand("start", "Запустить бота"), + types.BotCommand("help", "Вывести справку"), + ] + )