1
0
mirror of https://github.com/civsocit/olgram.git synced 2025-12-15 08:16:17 +00:00
This commit is contained in:
mihalin
2021-09-10 01:30:17 +03:00
parent 289b40b532
commit 1205eece56
2 changed files with 11 additions and 3 deletions

View File

@@ -28,6 +28,7 @@ async def register_token(bot: Bot) -> bool:
logger.info(f"register token {bot.name}")
a_bot = AioBot(bot.token)
res = await a_bot.set_webhook(url_for_bot(bot))
await a_bot.session.close()
del a_bot
return res
@@ -41,6 +42,7 @@ async def unregister_token(token: str):
logger.info(f"unregister token {token}")
bot = AioBot(token)
await bot.delete_webhook()
await bot.session.close()
del bot