diff --git a/pyrogram/types/user_and_chats/chat_privileges.py b/pyrogram/types/user_and_chats/chat_privileges.py index 557c7edc..ab53e764 100644 --- a/pyrogram/types/user_and_chats/chat_privileges.py +++ b/pyrogram/types/user_and_chats/chat_privileges.py @@ -32,6 +32,10 @@ class ChatPrivileges(Object): can_delete_messages (``bool``, *optional*): True, if the administrator can delete messages of other users. + can_delete_stories (``bool``, *optional*): + Channels only. + True, if the administrator can delete stories of other users. + can_manage_video_chats (``bool``, *optional*): Groups and supergroups only. True, if the administrator can manage video chats (also called group calls). @@ -51,10 +55,18 @@ class ChatPrivileges(Object): Channels only. True, if the administrator can post messages in the channel. + can_post_stories (``bool``, *optional*): + Channels only. + True, if the administrator can post stories in the channel. + can_edit_messages (``bool``, *optional*): Channels only. True, if the administrator can edit messages of other users and can pin messages. + can_edit_stories (``bool``, *optional*): + Channels only. + True, if the administrator can edit stories of other users. + can_invite_users (``bool``, *optional*): True, if the user is allowed to invite new users to the chat. @@ -75,12 +87,15 @@ class ChatPrivileges(Object): *, can_manage_chat: bool = True, can_delete_messages: bool = False, + can_delete_stories: bool = False, # Channels only can_manage_video_chats: bool = False, # Groups and supergroups only can_restrict_members: bool = False, can_promote_members: bool = False, can_change_info: bool = False, can_post_messages: bool = False, # Channels only + can_post_stories: bool = False, # Channels only can_edit_messages: bool = False, # Channels only + can_edit_stories: bool = False, # Channels only can_invite_users: bool = False, can_pin_messages: bool = False, # Groups and supergroups only can_manage_topics: bool = False, # Supergroups only @@ -90,12 +105,15 @@ class ChatPrivileges(Object): self.can_manage_chat: bool = can_manage_chat self.can_delete_messages: bool = can_delete_messages + self.can_delete_stories: bool = can_delete_stories self.can_manage_video_chats: bool = can_manage_video_chats self.can_restrict_members: bool = can_restrict_members self.can_promote_members: bool = can_promote_members self.can_change_info: bool = can_change_info self.can_post_messages: bool = can_post_messages + self.can_post_stories: bool = can_post_stories self.can_edit_messages: bool = can_edit_messages + self.can_edit_stories: bool = can_edit_stories self.can_invite_users: bool = can_invite_users self.can_pin_messages: bool = can_pin_messages self.can_manage_topics: bool = can_manage_topics @@ -106,12 +124,15 @@ class ChatPrivileges(Object): return ChatPrivileges( can_manage_chat=admin_rights.other, can_delete_messages=admin_rights.delete_messages, + can_delete_stories=admin_rights.delete_stories, can_manage_video_chats=admin_rights.manage_call, can_restrict_members=admin_rights.ban_users, can_promote_members=admin_rights.add_admins, can_change_info=admin_rights.change_info, can_post_messages=admin_rights.post_messages, + can_post_stories=admin_rights.post_stories, can_edit_messages=admin_rights.edit_messages, + can_edit_stories=admin_rights.edit_stories, can_invite_users=admin_rights.invite_users, can_pin_messages=admin_rights.pin_messages, can_manage_topics=admin_rights.manage_topics,