1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Merge pull request #806 from noideaw/patch-1

added can_invite_users parameter to restrict_chat_member function
This commit is contained in:
Badiboy 2020-04-24 18:15:05 +03:00 committed by GitHub
commit ce11b6f523
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -930,7 +930,7 @@ class TeleBot:
def restrict_chat_member(self, chat_id, user_id, until_date=None, can_send_messages=None, def restrict_chat_member(self, chat_id, user_id, until_date=None, can_send_messages=None,
can_send_media_messages=None, can_send_other_messages=None, can_send_media_messages=None, can_send_other_messages=None,
can_add_web_page_previews=None): can_add_web_page_previews=None, can_invite_users=None):
""" """
Use this method to restrict a user in a supergroup. Use this method to restrict a user in a supergroup.
The bot must be an administrator in the supergroup for this to work and must have The bot must be an administrator in the supergroup for this to work and must have
@ -953,7 +953,7 @@ class TeleBot:
""" """
return apihelper.restrict_chat_member(self.token, chat_id, user_id, until_date, can_send_messages, return apihelper.restrict_chat_member(self.token, chat_id, user_id, until_date, can_send_messages,
can_send_media_messages, can_send_other_messages, can_send_media_messages, can_send_other_messages,
can_add_web_page_previews) can_add_web_page_previews, can_invite_users)
def promote_chat_member(self, chat_id, user_id, can_change_info=None, can_post_messages=None, def promote_chat_member(self, chat_id, user_id, can_change_info=None, can_post_messages=None,
can_edit_messages=None, can_delete_messages=None, can_invite_users=None, can_edit_messages=None, can_delete_messages=None, can_invite_users=None,