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

@@ -5412,6 +5412,23 @@ class AsyncTeleBot:
"""
result = await asyncio_helper.get_sticker_set(self.token, name)
return types.StickerSet.de_json(result)
async 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 await asyncio_helper.set_sticker_keywords(self.token, sticker, keywords)
async def get_custom_emoji_stickers(self, custom_emoji_ids: List[str]) -> List[types.Sticker]:
"""