UPG: Add BotCommand, setMyCommands

This commit is contained in:
Anthony Byuraev
2020-05-08 21:06:39 +03:00
parent c5e5af96d1
commit a56fb8cc54
4 changed files with 90 additions and 40 deletions

View File

@@ -643,6 +643,12 @@ def set_chat_title(token, chat_id, title):
return _make_request(token, method_url, params=payload, method='post')
def set_my_commands(token, commands):
method_url = r'setMyCommands'
payload = {'commands': _convert_list_json_serializable(commands)}
return _make_request(token, method_url, params=payload, method='post')
def set_chat_description(token, chat_id, description):
method_url = 'setChatDescription'
payload = {'chat_id': chat_id, 'description': description}