1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00
This commit is contained in:
_run
2021-12-07 22:17:51 +05:00
parent fbf34f5953
commit 038be81db3
5 changed files with 109 additions and 4 deletions

View File

@ -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 = {