From 36e2305ce78cd2a2880944bd43fb0354002a3823 Mon Sep 17 00:00:00 2001 From: netkas Date: Thu, 14 Nov 2024 22:37:56 -0500 Subject: [PATCH] Add GetCustomEmojiStickers method --- src/TgBotLib/Enums/Methods.php | 3 ++ .../Objects/GetCustomEmojiStickers.php | 45 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 src/TgBotLib/Objects/GetCustomEmojiStickers.php diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index 4abe5c9..5eabc46 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\GetCustomEmojiStickers; use TgBotLib\Objects\GetStickerSet; enum Methods : string @@ -208,6 +209,7 @@ case DELETE_MESSAGES = 'deleteMessages'; case SEND_STICKER = 'sendSticker'; case GET_STICKER_SET = 'getStickerSet'; + case GET_CUSTOM_EMOJI_STICKERS = 'getCustomEmojiStickers'; /** * Executes a command on the provided bot with the given parameters. @@ -321,6 +323,7 @@ self::DELETE_MESSAGES => DeleteMessages::execute($bot, $parameters), self::SEND_STICKER => SendSticker::execute($bot, $parameters), self::GET_STICKER_SET => GetStickerSet::execute($bot, $parameters), + self::GET_CUSTOM_EMOJI_STICKERS => GetCustomEmojiStickers::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Objects/GetCustomEmojiStickers.php b/src/TgBotLib/Objects/GetCustomEmojiStickers.php new file mode 100644 index 0000000..3a86ded --- /dev/null +++ b/src/TgBotLib/Objects/GetCustomEmojiStickers.php @@ -0,0 +1,45 @@ +value, $parameters))); + } + + /** + * @inheritDoc + */ + public static function getRequiredParameters(): ?array + { + return [ + 'custom_emoji_ids' + ]; + } + + /** + * @inheritDoc + */ + public static function getOptionalParameters(): ?array + { + return null; + } + } \ No newline at end of file