From ee5f8fb06f8bee4d79bb5465648436ed777b39f4 Mon Sep 17 00:00:00 2001 From: netkas Date: Fri, 15 Nov 2024 15:18:05 -0500 Subject: [PATCH] Add DeleteStickerSet method --- src/TgBotLib/Enums/Methods.php | 2 ++ src/TgBotLib/Methods/DeleteStickerSet.php | 37 +++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 src/TgBotLib/Methods/DeleteStickerSet.php diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index 394687b..a4f69fa 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -232,6 +232,7 @@ case SET_STICKER_SET_TITLE = 'setStickerSetTitle'; case SET_STICKER_SET_THUMBNAIL = 'setStickerSetThumbnail'; case SET_CUSTOM_EMOJI_STICKER_SET_THUMBNAIL = 'setCustomEmojiStickerSetThumbnail'; + case DELETE_STICKER_SET = 'deleteStickerSet'; /** * Executes a command on the provided bot with the given parameters. @@ -357,6 +358,7 @@ self::SET_STICKER_SET_TITLE => SetStickerSetTitle::execute($bot, $parameters), self::SET_STICKER_SET_THUMBNAIL => SetStickerSetThumbnail::execute($bot, $parameters), self::SET_CUSTOM_EMOJI_STICKER_SET_THUMBNAIL => SetCustomEmojiStickerSetThumbnail::execute($bot, $parameters), + self::DELETE_STICKER_SET => DeleteStickerFromSet::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Methods/DeleteStickerSet.php b/src/TgBotLib/Methods/DeleteStickerSet.php new file mode 100644 index 0000000..8d2372d --- /dev/null +++ b/src/TgBotLib/Methods/DeleteStickerSet.php @@ -0,0 +1,37 @@ +value, $parameters)); + } + + /** + * @inheritDoc + */ + public static function getRequiredParameters(): ?array + { + return [ + 'name' + ]; + } + + /** + * @inheritDoc + */ + public static function getOptionalParameters(): ?array + { + return null; + } + } \ No newline at end of file