mirror of
https://github.com/TeamPGM/PagerMaid-Pyro.git
synced 2024-11-28 02:51:33 +00:00
fix: create event loop for pyrogram
This commit is contained in:
parent
f951a25b03
commit
e9d3d1fab0
@ -1,3 +1,5 @@
|
|||||||
|
import asyncio
|
||||||
|
import contextlib
|
||||||
from sys import path, platform
|
from sys import path, platform
|
||||||
from os import sep
|
from os import sep
|
||||||
from importlib import import_module
|
from importlib import import_module
|
||||||
@ -55,4 +57,5 @@ async def main():
|
|||||||
await bot.stop()
|
await bot.stop()
|
||||||
|
|
||||||
|
|
||||||
bot.run(main())
|
with contextlib.closing(asyncio.new_event_loop()):
|
||||||
|
bot.run(main())
|
||||||
|
Loading…
Reference in New Issue
Block a user