mirror of
https://github.com/civsocit/olgram.git
synced 2025-05-24 19:33:24 +00:00
token fix
This commit is contained in:
parent
6deaff27b0
commit
b740b04d2b
|
@ -23,6 +23,7 @@ async def register_token(bot: Bot) -> bool:
|
||||||
:param bot: Бот
|
:param bot: Бот
|
||||||
:return: получилось ли
|
:return: получилось ли
|
||||||
"""
|
"""
|
||||||
|
await unregister_token(bot.token)
|
||||||
a_bot = AioBot(bot.token)
|
a_bot = AioBot(bot.token)
|
||||||
res = await a_bot.set_webhook(url_for_bot(bot))
|
res = await a_bot.set_webhook(url_for_bot(bot))
|
||||||
await a_bot.session.close()
|
await a_bot.session.close()
|
||||||
|
@ -36,6 +37,7 @@ async def unregister_token(token: str):
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
bot = AioBot(token)
|
bot = AioBot(token)
|
||||||
|
await bot.session.close()
|
||||||
await bot.delete_webhook()
|
await bot.delete_webhook()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user