mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Don't use deprecated Bot.close method from dispatcher (Replaced by session.close)
This commit is contained in:
parent
f38d42c0a0
commit
c12a76e8c0
2 changed files with 2 additions and 2 deletions
|
|
@ -175,7 +175,7 @@ class BaseBot:
|
|||
self._ctx_token.reset(token)
|
||||
|
||||
@deprecated("This method's behavior will be changed in aiogram v3.0. "
|
||||
"More info: https://core.telegram.org/bots/api#close")
|
||||
"More info: https://core.telegram.org/bots/api#close", stacklevel=3)
|
||||
async def close(self):
|
||||
"""
|
||||
Close all client sessions
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@ class Executor:
|
|||
self.dispatcher.stop_polling()
|
||||
await self.dispatcher.storage.close()
|
||||
await self.dispatcher.storage.wait_closed()
|
||||
await self.dispatcher.bot.close()
|
||||
await self.dispatcher.bot.session.close()
|
||||
|
||||
async def _startup_polling(self):
|
||||
await self._welcome()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue