Fix of a small mess up
This commit is contained in:
parent
740bcd145a
commit
1863900299
@ -217,26 +217,6 @@ class ChatMember(Object):
|
|||||||
status="creator",
|
status="creator",
|
||||||
client=client
|
client=client
|
||||||
)
|
)
|
||||||
|
|
||||||
if isinstance(member, raw.types.ChannelParticipantCreator):
|
|
||||||
permissions = member.admin_rights
|
|
||||||
return ChatMember(
|
|
||||||
user=user,
|
|
||||||
status="creator",
|
|
||||||
title=getattr(member, "rank", None),
|
|
||||||
joined_date=member.date,
|
|
||||||
invited_by=invited_by,
|
|
||||||
can_be_edited=member.can_edit,
|
|
||||||
can_change_info=permissions.change_info,
|
|
||||||
can_post_messages=permissions.post_messages,
|
|
||||||
can_edit_messages=permissions.edit_messages,
|
|
||||||
can_delete_messages=permissions.delete_messages,
|
|
||||||
can_restrict_members=permissions.ban_users,
|
|
||||||
can_invite_users=permissions.invite_users,
|
|
||||||
can_pin_messages=permissions.pin_messages,
|
|
||||||
can_promote_members=permissions.add_admins,
|
|
||||||
client=client
|
|
||||||
)
|
|
||||||
|
|
||||||
if isinstance(member, raw.types.ChatParticipantAdmin):
|
if isinstance(member, raw.types.ChatParticipantAdmin):
|
||||||
return ChatMember(
|
return ChatMember(
|
||||||
|
Loading…
Reference in New Issue
Block a user