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

https://git.n64.cc/nosial/libs/tgbot/-/issues/2
This commit is contained in:
Netkas 2023-04-10 20:34:14 -04:00
parent 917077c19a
commit 5283416292
2 changed files with 25 additions and 0 deletions

View file

@ -32,6 +32,8 @@ This update accompanies the release of the [Telegram Bot API 6.6](https://core.t
* Added object `\TgBotLib\Objects\Telegram > StickerSet` to represent a sticker set.
* Added method `\TgBotLib\Bot > setStickerSetThumbnail()` to set the thumbnail of a sticker set.
See [setStickerSetThumbnail](https://core.telegram.org/bots/api#setstickersetthumbnail) for more information.
* Added method `\TgBotLib\Bot > setStickerSetTitle()` to set the title of a sticker set.
See [setStickerSetTitle](https://core.telegram.org/bots/api#setstickersettitle) for more information.
### Changed
* Removed unused `__destruct()` method from `\TgBotLib\Bot`

View file

@ -2604,6 +2604,8 @@
* @param array $options Optional parameters
* @return bool
* @throws TelegramException
* @link https://core.telegram.org/bots/api#setstickersetthumbnail
* @noinspection PhpUnused
*/
public function setStickerSetThumbnail(string $name, int $user_id, string $thumb, array $options=[]): bool
{
@ -2626,4 +2628,25 @@
return true;
}
/**
* Use this method to set the title of a created sticker set. Returns True on success.
*
* @param string $name Sticker set name
* @param string $title Sticker set title, 1-64 characters
* @param array $options Optional parameters
* @return bool
* @throws TelegramException
* @link https://core.telegram.org/bots/api#setstickersettitle
* @noinspection PhpUnused
*/
public function setStickerSetTitle(string $name, string $title, array $options=[]): bool
{
$this->sendRequest('setStickerSetTitle', array_merge([
'name' => $name,
'title' => $title
], $options));
return true;
}
}