Avoid using telethon.sync in the examples

This commit is contained in:
Lonami Exo
2019-08-13 23:33:39 +02:00
parent 61c0e63bbe
commit e1905d0d7a
28 changed files with 283 additions and 217 deletions
+2 -2
View File
@@ -401,7 +401,7 @@ class TelegramBaseClient(abc.ABC):
.. code-block:: python
try:
client.connect()
await client.connect()
except OSError:
print('Failed to connect')
"""
@@ -451,7 +451,7 @@ class TelegramBaseClient(abc.ABC):
.. code-block:: python
# You don't need to use this if you used "with client"
client.disconnect()
await client.disconnect()
"""
if self._loop.is_running():
return self._disconnect_coro()