diff --git a/CHANGELOG.md b/CHANGELOG.md index 99180b2..09795bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,8 @@ This update accompanies the release of the [Telegram Bot API 6.6](https://core.t See [setStickerSetTitle](https://core.telegram.org/bots/api#setstickersettitle) for more information. * Added method `\TgBotLib\Bot > deleteStickerSet()` to delete a sticker set. See [deleteStickerSet](https://core.telegram.org/bots/api#deletestickerset) for more information. + * Added method `\TgBotLib\Bot > setStickerEmojiList()` to set the list of emojis for a sticker set. + See [setStickerEmojiList](https://core.telegram.org/bots/api#setstickeremojilist) for more information. ### Changed * Removed unused `__destruct()` method from `\TgBotLib\Bot` diff --git a/src/TgBotLib/Bot.php b/src/TgBotLib/Bot.php index 8b03084..687ff55 100644 --- a/src/TgBotLib/Bot.php +++ b/src/TgBotLib/Bot.php @@ -2668,4 +2668,26 @@ return true; } + + /** + * Use this method to change the list of emoji 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 string $sticker File identifier of the sticker + * @param string[] $emoji_list A JSON-serialized list of 1-20 emoji associated with the sticker + * @param array $options + * @return bool + * @throws TelegramException + * @link https://core.telegram.org/bots/api#setstickeremojilist + * @noinspection PhpUnused + */ + public function setStickerEmojiList(string $sticker, array $emoji_list, array $options=[]): bool + { + $this->sendRequest('setStickerEmojiList', array_merge([ + 'sticker' => $sticker, + 'emoji_list' => $emoji_list + ], $options)); + + return true; + } } \ No newline at end of file