mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Fix AttributeError when received ChatForbidden
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
86621ba836
commit
02acefd6e2
1 changed files with 1 additions and 1 deletions
|
|
@ -379,7 +379,7 @@ class Chat(Object):
|
|||
|
||||
@staticmethod
|
||||
def _parse_chat(client, chat: Union[raw.types.Chat, raw.types.User, raw.types.Channel]) -> "Chat":
|
||||
if isinstance(chat, raw.types.Chat):
|
||||
if isinstance(chat, (raw.types.Chat, raw.types.ChatForbidden)):
|
||||
return Chat._parse_chat_chat(client, chat)
|
||||
elif isinstance(chat, raw.types.User):
|
||||
return Chat._parse_user_chat(client, chat)
|
||||
|
|
|
|||
Loading…
Reference in a new issue