diff --git a/telethon/network/mtprotosender.py b/telethon/network/mtprotosender.py index f27ee5ef..e9908257 100644 --- a/telethon/network/mtprotosender.py +++ b/telethon/network/mtprotosender.py @@ -188,6 +188,9 @@ class MTProtoSender: Since the receiving part is "built in" the future, it's impossible to await receive a result that was never sent. """ + if not self._user_connected: + raise ConnectionError('Cannot send requests while disconnected') + if utils.is_list_like(request): result = [] after = None