From da924dbaebffb48127e0a83547d9d41e12eb0df2 Mon Sep 17 00:00:00 2001 From: no_ideaw Date: Thu, 23 Apr 2020 23:59:04 +0430 Subject: [PATCH] Update __init__.py added can_invite_users parameter to restrict_chat_member function --- telebot/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/telebot/__init__.py b/telebot/__init__.py index d514ece..944d9ec 100644 --- a/telebot/__init__.py +++ b/telebot/__init__.py @@ -930,7 +930,7 @@ class TeleBot: 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_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. The bot must be an administrator in the supergroup for this to work and must have @@ -949,6 +949,8 @@ class TeleBot: use inline bots, implies can_send_media_messages :param can_add_web_page_previews: Pass True, if the user may add web page previews to their messages, implies can_send_media_messages + :param can_invite_users: Pass True, if the user is allowed to invite new users to the chat, + implies can_invite_users :return: types.Message """ return apihelper.restrict_chat_member(self.token, chat_id, user_id, until_date, can_send_messages,