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:
parent
917077c19a
commit
5283416292
2 changed files with 25 additions and 0 deletions
|
@ -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`
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue