mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 17:36:34 +03:00
Fix is_connected accessing unexisting property
This commit is contained in:
parent
0f5f6cc050
commit
ac6dbb8a5c
|
@ -287,7 +287,8 @@ class TelegramBaseClient(abc.ABC):
|
|||
"""
|
||||
Returns ``True`` if the user has connected.
|
||||
"""
|
||||
return self._sender.is_connected()
|
||||
sender = getattr(self, '_sender', None)
|
||||
return sender and sender.is_connected()
|
||||
|
||||
async def disconnect(self):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user