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

@@ -1620,6 +1620,14 @@ def get_sticker_set(token, name):
def get_custom_emoji_stickers(token, custom_emoji_ids):
method_url = r'getCustomEmojiStickers'
return _make_request(token, method_url, params={'custom_emoji_ids': json.dumps(custom_emoji_ids)})
def set_sticker_keywords(token, sticker, keywords=None):
method_url = 'setStickerKeywords'
payload = {'sticker': sticker}
if keywords:
payload['keywords'] = json.dumps(keywords)
return _make_request(token, method_url, params=payload, method='post')
def upload_sticker_file(token, user_id, sticker, sticker_format):
method_url = 'uploadStickerFile'