From c54be38696201a7253c1ee21bbe188adb01ac978 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 24 Apr 2022 11:56:07 +0200 Subject: [PATCH] Rename can_manage_voice_chats to can_manage_video_chats --- pyrogram/methods/chats/promote_chat_member.py | 2 +- pyrogram/types/user_and_chats/chat_privileges.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyrogram/methods/chats/promote_chat_member.py b/pyrogram/methods/chats/promote_chat_member.py index e6f2171e..f8a2779b 100644 --- a/pyrogram/methods/chats/promote_chat_member.py +++ b/pyrogram/methods/chats/promote_chat_member.py @@ -86,7 +86,7 @@ class PromoteChatMember: invite_users=privileges.can_invite_users, pin_messages=privileges.can_pin_messages, add_admins=privileges.can_promote_members, - manage_call=privileges.can_manage_voice_chats, + manage_call=privileges.can_manage_video_chats, other=privileges.can_manage_chat ), rank=rank or "" diff --git a/pyrogram/types/user_and_chats/chat_privileges.py b/pyrogram/types/user_and_chats/chat_privileges.py index 403bb957..8a420da5 100644 --- a/pyrogram/types/user_and_chats/chat_privileges.py +++ b/pyrogram/types/user_and_chats/chat_privileges.py @@ -32,7 +32,7 @@ class ChatPrivileges(Object): can_delete_messages (``bool``, *optional*): True, if the administrator can delete messages of other users. - can_manage_voice_chats (``bool``, *optional*): + can_manage_video_chats (``bool``, *optional*): Groups and supergroups only. True, if the administrator can manage voice chats (also called group calls). @@ -71,7 +71,7 @@ class ChatPrivileges(Object): *, can_manage_chat: bool = True, can_delete_messages: bool = False, - can_manage_voice_chats: bool = False, # Groups and supergroups 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, @@ -85,7 +85,7 @@ class ChatPrivileges(Object): self.can_manage_chat: bool = can_manage_chat self.can_delete_messages: bool = can_delete_messages - self.can_manage_voice_chats: bool = can_manage_voice_chats + 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 @@ -100,7 +100,7 @@ class ChatPrivileges(Object): return ChatPrivileges( can_manage_chat=admin_rights.other, can_delete_messages=admin_rights.delete_messages, - can_manage_voice_chats=admin_rights.manage_call, + 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,