From 3bfdb2491c814f1cf4a2ebc7b6ff2e8723884a87 Mon Sep 17 00:00:00 2001 From: netkas Date: Fri, 15 Nov 2024 15:00:48 -0500 Subject: [PATCH] Added SetStickerEmojiList method --- src/TgBotLib/Enums/Methods.php | 3 ++ src/TgBotLib/Methods/SetStickerEmojiList.php | 43 ++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 src/TgBotLib/Methods/SetStickerEmojiList.php diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index b3e937d..4090603 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -100,6 +100,7 @@ use TgBotLib\Methods\SetMyDescription; use TgBotLib\Methods\SetMyName; use TgBotLib\Methods\SetMyShortDescription; + use TgBotLib\Methods\SetStickerEmojiList; use TgBotLib\Methods\SetStickerPositionInSet; use TgBotLib\Methods\SetWebhook; use TgBotLib\Methods\StopMessageLiveLocation; @@ -222,6 +223,7 @@ case SET_STICKER_POSITION_IN_SET = 'setStickerPositionInSet'; case DELETE_STICKER_FROM_SET = 'deleteStickerFromSet'; case REPLACE_STICKER_IN_SET = 'replaceStickerInSet'; + case SET_STICKER_EMOJI_LIST = 'setStickerEmojiList'; /** * Executes a command on the provided bot with the given parameters. @@ -342,6 +344,7 @@ self::SET_STICKER_POSITION_IN_SET => SetStickerPositionInSet::execute($bot, $parameters), self::DELETE_STICKER_FROM_SET => DeleteStickerFromSet::execute($bot, $parameters), self::REPLACE_STICKER_IN_SET => ReplaceStickerInSet::execute($bot, $parameters), + self::SET_STICKER_EMOJI_LIST => SetStickerEmojiList::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Methods/SetStickerEmojiList.php b/src/TgBotLib/Methods/SetStickerEmojiList.php new file mode 100644 index 0000000..8b45fc1 --- /dev/null +++ b/src/TgBotLib/Methods/SetStickerEmojiList.php @@ -0,0 +1,43 @@ +value, $parameters)); + } + + /** + * @inheritDoc + */ + public static function getRequiredParameters(): ?array + { + return [ + 'sticker', + 'emoji_list' + ]; + } + + /** + * @inheritDoc + */ + public static function getOptionalParameters(): ?array + { + return null; + } + } \ No newline at end of file