minor fixes
All checks were successful
Build Docs / changes (push) Successful in 4s
Build Docs / build-docs (push) Has been skipped
Build Docs / deploy-docs (push) Has been skipped

This commit is contained in:
Alexander Kalinovsky
2025-03-20 01:53:04 +07:00
parent 6965c03fec
commit ffe2c95056

View File

@@ -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()