Get session and close instead of deprecated method
This commit is contained in:
parent
5e9390324a
commit
334dab2dbc
4
bot.py
4
bot.py
|
@ -22,8 +22,8 @@ async def main():
|
||||||
await dp.start_polling()
|
await dp.start_polling()
|
||||||
finally:
|
finally:
|
||||||
await dp.storage.close()
|
await dp.storage.close()
|
||||||
await dp.storage.wait_closed()
|
bot_session = await bot.get_session()
|
||||||
await bot.session.close()
|
await bot_session.close()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Reference in a new issue