Skip to content

Commit

Permalink
Renamed the parameter can_manage_voice_chats to can_manage_video_chat…
Browse files Browse the repository at this point in the history
…s in the method promoteChatMember. The old parameter will remain temporarily available.
  • Loading branch information
MA24th committed May 12, 2022
1 parent 126afc6 commit e253edb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions tgbotapi/asyncbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,11 @@ def restrict_chat_member(self, chat_id, user_id, permissions, until_date=None):
@async_handler()
def promote_chat_member(self, chat_id, user_id, is_anonymous=False, can_manage_chat=False, can_change_info=False,
can_post_messages=False, can_edit_messages=False, can_delete_messages=False,
can_manage_voice_chats=False, can_invite_users=False, can_restrict_members=False,
can_manage_video_chats=False, can_invite_users=False, can_restrict_members=False,
can_pin_messages=False, can_promote_members=False):
return Bot.promote_chat_member(self, chat_id, user_id, is_anonymous, can_manage_chat, can_change_info,
can_post_messages, can_edit_messages, can_delete_messages,
can_manage_voice_chats, can_invite_users, can_restrict_members, can_pin_messages,
can_manage_video_chats, can_invite_users, can_restrict_members, can_pin_messages,
can_promote_members)

@async_handler()
Expand Down
6 changes: 3 additions & 3 deletions tgbotapi/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ def restrict_chat_member(self, chat_id, user_id, permissions, until_date=None):

def promote_chat_member(self, chat_id, user_id, is_anonymous=False, can_manage_chat=False, can_change_info=False,
can_post_messages=False, can_edit_messages=False, can_delete_messages=False,
can_manage_voice_chats=False, can_invite_users=False, can_restrict_members=False,
can_manage_video_chats=False, can_invite_users=False, can_restrict_members=False,
can_pin_messages=False, can_promote_members=False):
"""
Use this method to promote or demote a user in a supergroup or a channel
Expand All @@ -1013,7 +1013,7 @@ def promote_chat_member(self, chat_id, user_id, is_anonymous=False, can_manage_c
:param bool can_edit_messages: Pass True, if the administrator can edit messages of other users and
can pin messages, channels only
:param bool can_delete_messages: Pass True, if the administrator can delete messages of other users
:param bool can_manage_voice_chats: True, if the administrator can manage voice chats
:param bool can_manage_video_chats: True, if the administrator can manage voice chats
:param bool can_invite_users: Pass True, if the administrator can invite new users to the chat
:param bool can_restrict_members: Pass True, if the administrator can restrict, ban or unban chat members
:param bool can_pin_messages: Pass True, if the administrator can pin messages, supergroups only
Expand All @@ -1025,7 +1025,7 @@ def promote_chat_member(self, chat_id, user_id, is_anonymous=False, can_manage_c
"""
return methods.promote_chat_member(self.__api_url, self.__proxies, chat_id, user_id, is_anonymous,
can_manage_chat, can_change_info, can_post_messages, can_edit_messages,
can_delete_messages, can_delete_messages, can_invite_users,
can_delete_messages, can_manage_video_chats, can_invite_users,
can_restrict_members, can_pin_messages, can_promote_members)

def set_chat_administrator_custom_title(self, chat_id, user_id, custom_title):
Expand Down
8 changes: 4 additions & 4 deletions tgbotapi/methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ def restrict_chat_member(based_url, proxies, chat_id, user_id, permissions, unti


def promote_chat_member(based_url, proxies, chat_id, user_id, is_anonymous, can_manage_chat, can_change_info,
can_post_messages, can_edit_messages, can_delete_messages, can_manage_voice_chats,
can_post_messages, can_edit_messages, can_delete_messages, can_manage_video_chats,
can_invite_users, can_restrict_members, can_pin_messages, can_promote_members):
"""
Use this method to promote or demote a user in a supergroup or a channel
Expand All @@ -1106,7 +1106,7 @@ def promote_chat_member(based_url, proxies, chat_id, user_id, is_anonymous, can_
:type can_post_messages: bool
:type can_edit_messages: bool
:type can_delete_messages: bool
:type can_manage_voice_chats: bool
:type can_manage_video_chats: bool
:type can_invite_users: bool
:type can_restrict_members: bool
:type can_pin_messages: bool
Expand All @@ -1128,8 +1128,8 @@ def promote_chat_member(based_url, proxies, chat_id, user_id, is_anonymous, can_
params['can_post_messages'] = can_post_messages
if can_edit_messages:
params['can_edit_messages'] = can_edit_messages
if can_manage_voice_chats:
params['can_manage_voice_chats'] = can_manage_voice_chats
if can_manage_video_chats:
params['can_manage_video_chats'] = can_manage_video_chats
if can_delete_messages:
params['can_delete_messages'] = can_delete_messages
if can_invite_users:
Expand Down

0 comments on commit e253edb

Please sign in to comment.