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
1 changed files with 2 additions and 2 deletions

4
bot.py
View File

@ -22,8 +22,8 @@ async def main():
await dp.start_polling()
finally:
await dp.storage.close()
await dp.storage.wait_closed()
await bot.session.close()
bot_session = await bot.get_session()
await bot_session.close()
if __name__ == '__main__':