Added method \TgBotLib\Bot > setStickerKeywords() to set the list of emojis for a sticker set. See [setStickerKeywords](https://core.telegram.org/bots/api#setstickerkeywords) for more information.

https://git.n64.cc/nosial/libs/tgbot/-/issues/2
This commit is contained in:
Netkas 2023-04-10 20:56:03 -04:00
parent 174210da67
commit 54fc17b549
2 changed files with 24 additions and 0 deletions

View file

@ -38,6 +38,8 @@ This update accompanies the release of the [Telegram Bot API 6.6](https://core.t
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.
* Added method `\TgBotLib\Bot > setStickerKeywords()` to set the list of emojis for a sticker set.
See [setStickerKeywords](https://core.telegram.org/bots/api#setstickerkeywords) for more information.
### Changed
* Removed unused `__destruct()` method from `\TgBotLib\Bot`

View file

@ -2690,4 +2690,26 @@
return true;
}
/**
* Use this method to change search keywords 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 array $keywords A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters
* @param array $options Optional parameters
* @return bool
* @throws TelegramException
* @link https://core.telegram.org/bots/api#setstickerkeywords
* @noinspection PhpUnused
*/
public function setStickerKeywords(string $sticker, array $keywords, array $options=[]): bool
{
$this->sendRequest('setStickerKeywords', array_merge([
'sticker' => $sticker,
'keywords' => $keywords
], $options));
return true;
}
}