mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
5.5
This commit is contained in:
@ -969,6 +969,20 @@ def set_chat_administrator_custom_title(token, chat_id, user_id, custom_title):
|
||||
return _make_request(token, method_url, params=payload, method='post')
|
||||
|
||||
|
||||
def ban_chat_sender_chat(token, chat_id, sender_chat_id, until_date=None):
|
||||
method_url = 'banChatSenderChat'
|
||||
payload = {'chat_id': chat_id, 'sender_chat_id': sender_chat_id}
|
||||
if until_date:
|
||||
payload['until_date'] = until_date
|
||||
return _make_request(token, method_url, params=payload, method='post')
|
||||
|
||||
|
||||
def unban_chat_sender_chat(token, chat_id, sender_chat_id):
|
||||
method_url = 'unbanChatSenderChat'
|
||||
payload = {'chat_id': chat_id, 'sender_chat_id': sender_chat_id}
|
||||
return _make_request(token, method_url, params=payload, method='post')
|
||||
|
||||
|
||||
def set_chat_permissions(token, chat_id, permissions):
|
||||
method_url = 'setChatPermissions'
|
||||
payload = {
|
||||
|
Reference in New Issue
Block a user