bot: add commands menu

parent 4a0e3e85
from telegrinder import API, Telegrinder, Token, Message
from telegrinder.modules import logger
from telegrinder.tools.formatting import HTMLFormatter
from telegrinder.types import LinkPreviewOptions
from telegrinder.types import LinkPreviewOptions, BotCommand
from telegrinder.node import Error
from config import config
......@@ -25,6 +25,10 @@ async def startup():
db.create_tables([User])
logger.info("initializing ALTRepo")
await altrepo.init()
await bot.api.set_my_commands(commands=[
BotCommand("watch", "Отслеживание по пакетам"),
BotCommand("bugs", "Отслеживание по ошибкам")
])
@bot.loop_wrapper.lifespan.on_shutdown
async def shutdown():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment