mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-05 23:04: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:
|
||||
:class:`Error <pyrogram.Error>`
|
||||
"""
|
||||
self.start()
|
||||
self.idle()
|
||||
asyncio.get_event_loop().run_until_complete(
|
||||
asyncio.gather(
|
||||
self.start(),
|
||||
self.idle()
|
||||
)
|
||||
)
|
||||
|
||||
def add_handler(self, handler, group: int = 0):
|
||||
"""Use this method to register an update handler.
|
||||
|
|
|
|||
Loading…
Reference in a new issue