From a5b472794d0e7990db0fa43d193416c11437a8fc Mon Sep 17 00:00:00 2001 From: netkas Date: Thu, 14 Nov 2024 22:36:02 -0500 Subject: [PATCH] Add GetStickerSet method --- src/TgBotLib/Enums/Methods.php | 3 ++ src/TgBotLib/Objects/GetStickerSet.php | 38 ++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 src/TgBotLib/Objects/GetStickerSet.php diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index baa5933..4abe5c9 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -104,6 +104,7 @@ use TgBotLib\Methods\UnpinAllForumTopicMessages; use TgBotLib\Methods\UnpinAllGeneralForumTopicMessages; use TgBotLib\Methods\UnpinChatMessage; + use TgBotLib\Objects\GetStickerSet; enum Methods : string { @@ -206,6 +207,7 @@ case DELETE_MESSAGE = 'deleteMessage'; case DELETE_MESSAGES = 'deleteMessages'; case SEND_STICKER = 'sendSticker'; + case GET_STICKER_SET = 'getStickerSet'; /** * Executes a command on the provided bot with the given parameters. @@ -318,6 +320,7 @@ self::DELETE_MESSAGE => DeleteMessage::execute($bot, $parameters), self::DELETE_MESSAGES => DeleteMessages::execute($bot, $parameters), self::SEND_STICKER => SendSticker::execute($bot, $parameters), + self::GET_STICKER_SET => GetStickerSet::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Objects/GetStickerSet.php b/src/TgBotLib/Objects/GetStickerSet.php new file mode 100644 index 0000000..e63116e --- /dev/null +++ b/src/TgBotLib/Objects/GetStickerSet.php @@ -0,0 +1,38 @@ +value, $parameters))); + } + + /** + * @inheritDoc + */ + public static function getRequiredParameters(): ?array + { + return [ + 'name' + ]; + } + + /** + * @inheritDoc + */ + public static function getOptionalParameters(): ?array + { + return null; + } + } \ No newline at end of file