From cd03e918073d0e5abf0a7980f5d1f59427283729 Mon Sep 17 00:00:00 2001 From: netkas Date: Fri, 15 Nov 2024 00:34:19 -0500 Subject: [PATCH] Add DeleteStickerFromSet method --- src/TgBotLib/Enums/Methods.php | 3 ++ src/TgBotLib/Methods/DeleteStickerFromSet.php | 37 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 src/TgBotLib/Methods/DeleteStickerFromSet.php diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index b22084b..800127f 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -26,6 +26,7 @@ use TgBotLib\Methods\DeleteMessage; use TgBotLib\Methods\DeleteMessages; use TgBotLib\Methods\DeleteMyCommands; + use TgBotLib\Methods\DeleteStickerFromSet; use TgBotLib\Methods\DeleteWebhook; use TgBotLib\Methods\EditChatInviteLink; use TgBotLib\Methods\EditChatSubscriptionInviteLink; @@ -218,6 +219,7 @@ case CREATE_NEW_STICKER_SET = 'createNewStickerSet'; case ADD_STICKER_TO_SET = 'addStickerToSet'; case SET_STICKER_POSITION_IN_SET = 'setStickerPositionInSet'; + case DELETE_STICKER_FROM_SET = 'deleteStickerFromSet'; /** * Executes a command on the provided bot with the given parameters. @@ -336,6 +338,7 @@ self::CREATE_NEW_STICKER_SET => CreateNewStickerSet::execute($bot, $parameters), self::ADD_STICKER_TO_SET => AddStickerToSet::execute($bot, $parameters), self::SET_STICKER_POSITION_IN_SET => SetStickerPositionInSet::execute($bot, $parameters), + self::DELETE_STICKER_FROM_SET => DeleteStickerFromSet::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Methods/DeleteStickerFromSet.php b/src/TgBotLib/Methods/DeleteStickerFromSet.php new file mode 100644 index 0000000..f9c5e83 --- /dev/null +++ b/src/TgBotLib/Methods/DeleteStickerFromSet.php @@ -0,0 +1,37 @@ +value, $parameters)); + } + + /** + * @inheritDoc + */ + public static function getRequiredParameters(): ?array + { + return [ + 'sticker' + ]; + } + + /** + * @inheritDoc + */ + public static function getOptionalParameters(): ?array + { + return null; + } + } \ No newline at end of file