mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-07 13:34:59 +03:00
Better better docs
This commit is contained in:
parent
7600462dca
commit
7faf808ad7
|
@ -16,9 +16,14 @@ class UpdateMethods(UserMethods):
|
||||||
|
|
||||||
def run_loop(self):
|
def run_loop(self):
|
||||||
"""
|
"""
|
||||||
Runs the event loop until a disconnection occurs, either from
|
Runs the event loop until `disconnect` is called or if an error
|
||||||
Telegram or by user action. If the loop is already running you
|
while connecting/sending/receiving occurs in the background. In
|
||||||
should ``await client.connection_dropped`` instead.
|
the latter case, said error will ``raise`` so you have a chance
|
||||||
|
to ``except`` it on your own code.
|
||||||
|
|
||||||
|
This method shouldn't be called from ``async def`` as the loop
|
||||||
|
will be running already. Use ``await client.connection_dropped``
|
||||||
|
in this situation instead.
|
||||||
"""
|
"""
|
||||||
self.loop.run_until_complete(self.connection_dropped)
|
self.loop.run_until_complete(self.connection_dropped)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user