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