Added method \TgBotLib\Bot > deleteStickerSet()
to delete a sticker set. See [deleteStickerSet](https://core.telegram.org/bots/api#deletestickerset) for more information.
https://git.n64.cc/nosial/libs/tgbot/-/issues/2
This commit is contained in:
parent
5283416292
commit
d171c61e7f
2 changed files with 21 additions and 0 deletions
|
@ -34,6 +34,8 @@ This update accompanies the release of the [Telegram Bot API 6.6](https://core.t
|
||||||
See [setStickerSetThumbnail](https://core.telegram.org/bots/api#setstickersetthumbnail) for more information.
|
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.
|
* 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.
|
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.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
* Removed unused `__destruct()` method from `\TgBotLib\Bot`
|
* Removed unused `__destruct()` method from `\TgBotLib\Bot`
|
||||||
|
|
|
@ -2649,4 +2649,23 @@
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use this method to delete a sticker set that was created by the bot. Returns True on success.
|
||||||
|
*
|
||||||
|
* @param string $name Sticker set name
|
||||||
|
* @param array $options Optional parameters
|
||||||
|
* @return bool
|
||||||
|
* @throws TelegramException
|
||||||
|
* @link https://core.telegram.org/bots/api#deletestickerset
|
||||||
|
* @noinspection PhpUnused
|
||||||
|
*/
|
||||||
|
public function deleteStickerSet(string $name, array $options=[]): bool
|
||||||
|
{
|
||||||
|
$this->sendRequest('deleteStickerSet', array_merge([
|
||||||
|
'name' => $name
|
||||||
|
], $options));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue