fix: create event loop for pyrogram

This commit is contained in:
Ricky8955555 2023-06-12 23:49:40 +08:00
parent f951a25b03
commit e9d3d1fab0
No known key found for this signature in database
GPG Key ID: 23D706942BAF8B74

View File

@ -1,3 +1,5 @@
import asyncio
import contextlib
from sys import path, platform
from os import sep
from importlib import import_module
@ -55,4 +57,5 @@ async def main():
await bot.stop()
bot.run(main())
with contextlib.closing(asyncio.new_event_loop()):
bot.run(main())