mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2026-09-10 10:46:00 +00:00
Avoid using telethon.sync in the examples
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user