Get session and close instead of deprecated method

This commit is contained in:
LoRiot 2022-10-15 19:24:54 +03:00
parent 5e9390324a
commit 334dab2dbc

4
bot.py
View file

@ -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__':