mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2021-05-13 03:08:02 +03:00
added only_if_banned to unban_chat_member
This commit is contained in:
@@ -1052,14 +1052,15 @@ class TeleBot:
|
||||
"""
|
||||
return apihelper.kick_chat_member(self.token, chat_id, user_id, until_date)
|
||||
|
||||
def unban_chat_member(self, chat_id, user_id):
|
||||
def unban_chat_member(self, chat_id, user_id, only_if_banned = False):
|
||||
"""
|
||||
Removes member from the ban
|
||||
:param chat_id:
|
||||
:param user_id:
|
||||
:param only_if_banned:
|
||||
:return:
|
||||
"""
|
||||
return apihelper.unban_chat_member(self.token, chat_id, user_id)
|
||||
return apihelper.unban_chat_member(self.token, chat_id, user_id, only_if_banned)
|
||||
|
||||
def restrict_chat_member(
|
||||
self, chat_id, user_id, until_date=None,
|
||||
|
||||
Reference in New Issue
Block a user