undo last
This commit is contained in:
@@ -195,18 +195,12 @@ class QBotApp[UserType: UserBase](FastAPI):
|
||||
language_code=None if locale == "default" else locale,
|
||||
)
|
||||
|
||||
while True:
|
||||
try:
|
||||
await self.bot.set_webhook(
|
||||
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,
|
||||
)
|
||||
break
|
||||
except Exception:
|
||||
logger.error("Error setting webhook", exc_info=True)
|
||||
await sleep(5)
|
||||
|
||||
async def bot_close(self):
|
||||
await self.bot.delete_webhook()
|
||||
|
||||
Reference in New Issue
Block a user