From f000bc422d44e9b5caf54316308259df8e99881b Mon Sep 17 00:00:00 2001 From: netkas Date: Wed, 6 Nov 2024 19:21:23 -0500 Subject: [PATCH] Add SetChatStickerSet method --- src/TgBotLib/Enums/Methods.php | 3 ++ src/TgBotLib/Methods/SetChatStickerSet.php | 38 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 src/TgBotLib/Methods/SetChatStickerSet.php diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index e828d08..3517848 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -56,6 +56,7 @@ use TgBotLib\Methods\SetChatDescription; use TgBotLib\Methods\SetChatPermissions; use TgBotLib\Methods\SetChatPhoto; + use TgBotLib\Methods\SetChatStickerSet; use TgBotLib\Methods\SetChatTitle; use TgBotLib\Methods\SetMessageReaction; use TgBotLib\Methods\SetWebhook; @@ -124,6 +125,7 @@ case GET_CHAT_ADMINISTRATORS = 'getChatAdministrators'; case GET_CHAT_MEMBER_COUNT = 'getChatMemberCount'; case GET_CHAT_MEMBER = 'getChatMember'; + case SET_CHAT_STICKER_SET = 'setChatStickerSet'; /** * Executes a command on the provided bot with the given parameters. @@ -195,6 +197,7 @@ self::GET_CHAT_ADMINISTRATORS => GetChatAdministrators::execute($bot, $parameters), 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), }; } } diff --git a/src/TgBotLib/Methods/SetChatStickerSet.php b/src/TgBotLib/Methods/SetChatStickerSet.php new file mode 100644 index 0000000..4982b13 --- /dev/null +++ b/src/TgBotLib/Methods/SetChatStickerSet.php @@ -0,0 +1,38 @@ +value, $parameters)); + } + + /** + * @inheritDoc + */ + public static function getRequiredParameters(): ?array + { + return [ + 'chat_id', + 'sticker_set_name' + ]; + } + + /** + * @inheritDoc + */ + public static function getOptionalParameters(): ?array + { + return null; + } + } \ No newline at end of file