From 334dab2dbce271f2ca851dbed849ab2a33f2f520 Mon Sep 17 00:00:00 2001 From: LoRiot Date: Sat, 15 Oct 2022 19:24:54 +0300 Subject: [PATCH] Get session and close instead of deprecated method --- bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index 27c7343..7877ed6 100644 --- a/bot.py +++ b/bot.py @@ -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__':