From ffe2c95056e7cf9bebf2104aea975fd36160d2f7 Mon Sep 17 00:00:00 2001 From: Alexander Kalinovsky Date: Thu, 20 Mar 2025 01:53:04 +0700 Subject: [PATCH] minor fixes --- src/qbot/main.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/qbot/main.py b/src/qbot/main.py index 1244c80..00979d9 100644 --- a/src/qbot/main.py +++ b/src/qbot/main.py @@ -185,13 +185,6 @@ class QBotApp[UserType: UserBase](FastAPI): commands_captions[locale] = [] commands_captions[locale].append((command_name, description)) - await self.bot.set_webhook( - url=f"{self.config.TELEGRAM_WEBHOOK_URL}/telegram/webhook", - drop_pending_updates=True, - allowed_updates=self.allowed_updates, - secret_token=self.bot_auth_token, - ) - for locale, commands in commands_captions.items(): await self.bot.set_my_commands( [ @@ -201,6 +194,13 @@ class QBotApp[UserType: UserBase](FastAPI): language_code=None if locale == "default" else locale, ) + await self.bot.set_webhook( + url=f"{self.config.TELEGRAM_WEBHOOK_URL}/telegram/webhook", + drop_pending_updates=True, + allowed_updates=self.allowed_updates, + secret_token=self.bot_auth_token, + ) + async def bot_close(self): await self.bot.delete_webhook() await self.bot.log_out()