Better better docs

This commit is contained in:
Lonami 2018-06-17 19:14:39 +02:00 committed by GitHub
parent 7600462dca
commit 7faf808ad7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)