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.
https://git.n64.cc/nosial/libs/tgbot/-/issues/2
This commit is contained in:
parent
595872c997
commit
007304c8ca
2 changed files with 22 additions and 0 deletions
|
@ -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`
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue