1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Added the ability to get the current bot name in the given language as the class BotName using the method getMyName.

This commit is contained in:
coder2020official
2023-04-22 18:30:46 +04:00
parent 77e1928628
commit 1d62adc262
5 changed files with 70 additions and 0 deletions

View File

@@ -1205,6 +1205,13 @@ def set_my_name(token, name=None, language_code=None):
payload['language_code'] = language_code
return _make_request(token, method_url, params=payload, method='post')
def get_my_name(token, language_code=None):
method_url = r'getMyName'
payload = {}
if language_code is not None:
payload['language_code'] = language_code
return _make_request(token, method_url, params=payload)
def set_chat_menu_button(token, chat_id=None, menu_button=None):
method_url = r'setChatMenuButton'
payload = {}