From fedf177803168cc6908554e2bb6add1ee0a33af0 Mon Sep 17 00:00:00 2001 From: netkas Date: Wed, 6 Nov 2024 19:22:39 -0500 Subject: [PATCH] Add DeleteChatStickerSet method to TgBotLib --- src/TgBotLib/Enums/Methods.php | 3 ++ src/TgBotLib/Methods/DeleteChatStickerSet.php | 37 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 src/TgBotLib/Methods/DeleteChatStickerSet.php diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index 3517848..b428d51 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -15,6 +15,7 @@ use TgBotLib\Methods\CreateChatSubscriptionInviteLink; use TgBotLib\Methods\DeclineChatJoinRequest; use TgBotLib\Methods\DeleteChatPhoto; + use TgBotLib\Methods\DeleteChatStickerSet; use TgBotLib\Methods\DeleteWebhook; use TgBotLib\Methods\EditChatInviteLink; use TgBotLib\Methods\EditChatSubscriptionInviteLink; @@ -126,6 +127,7 @@ case GET_CHAT_MEMBER_COUNT = 'getChatMemberCount'; case GET_CHAT_MEMBER = 'getChatMember'; case SET_CHAT_STICKER_SET = 'setChatStickerSet'; + case DELETE_CHAT_STICKER_SET = 'deleteChatStickerSet'; /** * Executes a command on the provided bot with the given parameters. @@ -198,6 +200,7 @@ self::GET_CHAT_MEMBER_COUNT => GetChatMemberCount::execute($bot, $parameters), self::GET_CHAT_MEMBER => GetChatMember::execute($bot, $parameters), self::SET_CHAT_STICKER_SET => SetChatStickerSet::execute($bot, $parameters), + self::DELETE_CHAT_STICKER_SET => DeleteChatStickerSet::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Methods/DeleteChatStickerSet.php b/src/TgBotLib/Methods/DeleteChatStickerSet.php new file mode 100644 index 0000000..bd82187 --- /dev/null +++ b/src/TgBotLib/Methods/DeleteChatStickerSet.php @@ -0,0 +1,37 @@ +value, $parameters)); + } + + /** + * @inheritDoc + */ + public static function getRequiredParameters(): ?array + { + return [ + 'chat_id' + ]; + } + + /** + * @inheritDoc + */ + public static function getOptionalParameters(): ?array + { + return null; + } + } \ No newline at end of file