diff --git a/telethon/_client/auth.py b/telethon/_client/auth.py index 59f64933..a4942a64 100644 --- a/telethon/_client/auth.py +++ b/telethon/_client/auth.py @@ -368,7 +368,7 @@ async def qr_login(self: 'TelegramClient', ignored_ids: typing.List[int] = None) async def log_out(self: 'TelegramClient') -> bool: try: await self(_tl.fn.auth.LogOut()) - except errors.RPCError: + except errors.RpcError: return False await self.disconnect() diff --git a/telethon/errors/_rpcbase.py b/telethon/errors/_rpcbase.py index c67c6ebf..31691397 100644 --- a/telethon/errors/_rpcbase.py +++ b/telethon/errors/_rpcbase.py @@ -143,5 +143,5 @@ ServerError = _mk_error_type(code=500, doc=""" # Witnessed as -503 for "Timeout" BotTimeout = TimedOutError = _mk_error_type(code=503, doc=""" Clicking the inline buttons of bots that never (or take to long to) - call ``answerCallbackQuery`` will result in this "special" RPCError. + call ``answerCallbackQuery`` will result in this "special" RpcError. """) diff --git a/telethon/types/_custom/chatgetter.py b/telethon/types/_custom/chatgetter.py index c92ffb00..03306849 100644 --- a/telethon/types/_custom/chatgetter.py +++ b/telethon/types/_custom/chatgetter.py @@ -80,7 +80,7 @@ class ChatGetter(abc.ABC): self._chat = d.entity self._input_chat = d.input_entity break - except errors.RPCError: + except errors.RpcError: pass return self._input_chat