[new] use run instead loop.run_until_complete

from: https://docs.python.org/3/library/asyncio-task.html#running-an-asyncio-program
This commit is contained in:
levina 2022-03-01 12:20:16 +07:00 committed by GitHub
parent 9220ea503f
commit 471835a619
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,8 +13,8 @@ async def start_bot():
await user.join_chat("VeezSupportGroup")
await user.join_chat("levinachannel")
await idle()
LOGS.info("[INFO]: BOT & USERBOT STOPPED !!")
LOGS.info("[INFO]: BOT & USERBOT CLIENT STOPPED !!")
await bot.stop()
loop = asyncio.get_event_loop()
loop.run_until_complete(start_bot())
asyncio.run(start_bot())