mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-07 07:24:51 +00:00
Make run() run the event loop
This commit is contained in:
parent
2571bf0758
commit
5446801c14
1 changed files with 6 additions and 2 deletions
|
|
@ -294,8 +294,12 @@ class Client(Methods, BaseClient):
|
||||||
Raises:
|
Raises:
|
||||||
:class:`Error <pyrogram.Error>`
|
:class:`Error <pyrogram.Error>`
|
||||||
"""
|
"""
|
||||||
self.start()
|
asyncio.get_event_loop().run_until_complete(
|
||||||
self.idle()
|
asyncio.gather(
|
||||||
|
self.start(),
|
||||||
|
self.idle()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
def add_handler(self, handler, group: int = 0):
|
def add_handler(self, handler, group: int = 0):
|
||||||
"""Use this method to register an update handler.
|
"""Use this method to register an update handler.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue