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

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

@@ -80,6 +80,7 @@ class TeleBot:
getChatMembersCount
getChatMember
answerCallbackQuery
setMyCommands
answerInlineQuery
"""
@@ -1022,6 +1023,15 @@ class TeleBot:
"""
return apihelper.delete_chat_photo(self.token, chat_id)
def set_my_commands(self, commands):
"""
Use this method to change the list of the bot's commands.
:param commands: Array of BotCommand. A JSON-serialized list of bot commands
to be set as the list of the bot's commands. At most 100 commands can be specified.
:return:
"""
return apihelper.set_my_commands(self.token, commands)
def set_chat_title(self, chat_id, title):
"""
Use this method to change the title of a chat. Titles can't be changed for private chats.