diff --git a/CHANGELOG.md b/CHANGELOG.md index b4286db..934f3fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,8 @@ This update accompanies the release of the [Telegram Bot API 6.6](https://core.t * Added abstract class `\TgBotLib\Abstracts > StickerFormat` to represent a sticker format ("`static`", "`animated`" or "`video`") * Added method `\TgBotLib\Bot > uploadStickerFile()` to upload a sticker file with a sticker for later use in `createNewStickerSet` and `addStickerToSet` methods (can be used multiple times). See [uploadStickerFile](https://core.telegram.org/bots/api#uploadstickerfile) for more information. + * Added method `\TgBotLib\Bot > setCustomEmojiStickerSetThumbnail()` to set the thumbnail of a sticker set. + See [setCustomEmojiStickerSetThumbnail](https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail) for more information. ### Changed * Removed unused `__destruct()` method from `\TgBotLib\Bot` diff --git a/src/TgBotLib/Bot.php b/src/TgBotLib/Bot.php index 01ee53d..f2f4847 100644 --- a/src/TgBotLib/Bot.php +++ b/src/TgBotLib/Bot.php @@ -2573,4 +2573,24 @@ unset($tmp_file); return $response; } + + /** + * Use this method to set the thumbnail of a custom emoji sticker set. Returns True on success. + * + * @param string $name Sticker set name + * @param string $custom_emoji_id Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail. + * @return bool + * @throws TelegramException + * @link https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail + * @noinspection PhpUnused + */ + public function setCustomEmojiStickerSetThumbnail(string $name, string $custom_emoji_id=''): bool + { + $this->sendRequest('setCustomEmojiStickerSetThumbnail', [ + 'name' => $name, + 'custom_emoji_id' => $custom_emoji_id + ]); + + return true; + } } \ No newline at end of file