Skip to content

Commit 99e152a

Browse files
authored
Fix accessing non-existent attribute (pyrogram#747)
This should solve the error `AttributeError: 'ChatParticipantsForbidden' object has no attribute 'participants'` and apply the commit pyrogram@062a6ce on this file, too.
1 parent 4d933b8 commit 99e152a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyrogram/methods/chats/get_chat_members.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ async def get_chat_members(
112112
)
113113
)
114114

115-
members = r.full_chat.participants.participants
115+
members = getattr(r.full_chat.participants, "participants", [])
116116
users = {i.id: i for i in r.users}
117117

118118
return types.List(types.ChatMember._parse(self, member, users, {}) for member in members)

0 commit comments

Comments
 (0)