From 99e152a67cdfe81b7ae021fe5ffb7e8c5e01392b Mon Sep 17 00:00:00 2001 From: Jonathan <49692607+jonatan1609@users.noreply.github.com> Date: Sat, 28 Aug 2021 15:40:10 +0300 Subject: [PATCH] Fix accessing non-existent attribute (#747) This should solve the error `AttributeError: 'ChatParticipantsForbidden' object has no attribute 'participants'` and apply the commit https://github.com/pyrogram/pyrogram/commit/062a6ce6dd8e9cbc9ee18d6c7c43bae5607ed215 on this file, too. --- pyrogram/methods/chats/get_chat_members.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/methods/chats/get_chat_members.py b/pyrogram/methods/chats/get_chat_members.py index 1f891b46..64abf1e5 100644 --- a/pyrogram/methods/chats/get_chat_members.py +++ b/pyrogram/methods/chats/get_chat_members.py @@ -112,7 +112,7 @@ class GetChatMembers(Scaffold): ) ) - members = r.full_chat.participants.participants + members = getattr(r.full_chat.participants, "participants", []) users = {i.id: i for i in r.users} return types.List(types.ChatMember._parse(self, member, users, {}) for member in members)