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

Added the method setStickerKeywords for changing the search keywords assigned to a sticker.

This commit is contained in:
coder2020official
2023-03-11 22:58:41 +04:00
parent de5a32e45c
commit 9fa5b91e58
4 changed files with 50 additions and 0 deletions

View File

@@ -4564,6 +4564,23 @@ class TeleBot:
result = apihelper.get_custom_emoji_stickers(self.token, custom_emoji_ids)
return [types.Sticker.de_json(sticker) for sticker in result]
def set_sticker_keywords(self, sticker: str, keywords: List[str]=None) -> bool:
"""
Use this method to change search keywords assigned to a regular or custom emoji sticker.
The sticker must belong to a sticker set created by the bot.
Returns True on success.
:param sticker: File identifier of the sticker.
:type sticker: :obj:`str`
:param keywords: A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters
:type keywords: :obj:`list` of :obj:`str`
:return: On success, True is returned.
:rtype: :obj:`bool`
"""
return apihelper.set_sticker_keywords(self.token, sticker, keywords)
def set_custom_emoji_sticker_set_thumbnail(self, name: str, custom_emoji_id: Optional[str]=None) -> bool:
"""