From 9a7fb4194f37207ebe56b33a69b1a986affb8d76 Mon Sep 17 00:00:00 2001 From: netkas Date: Fri, 15 Nov 2024 00:32:38 -0500 Subject: [PATCH] Add SetStickerPositionInSet method --- src/TgBotLib/Enums/Methods.php | 3 ++ .../Methods/SetStickerPositionInSet.php | 38 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 src/TgBotLib/Methods/SetStickerPositionInSet.php diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index 94734f0..b22084b 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -98,6 +98,7 @@ use TgBotLib\Methods\SetMyDescription; use TgBotLib\Methods\SetMyName; use TgBotLib\Methods\SetMyShortDescription; + use TgBotLib\Methods\SetStickerPositionInSet; use TgBotLib\Methods\SetWebhook; use TgBotLib\Methods\StopMessageLiveLocation; use TgBotLib\Methods\StopPoll; @@ -216,6 +217,7 @@ case UPLOAD_STICKER_FILE = 'uploadStickerFile'; case CREATE_NEW_STICKER_SET = 'createNewStickerSet'; case ADD_STICKER_TO_SET = 'addStickerToSet'; + case SET_STICKER_POSITION_IN_SET = 'setStickerPositionInSet'; /** * Executes a command on the provided bot with the given parameters. @@ -333,6 +335,7 @@ self::UPLOAD_STICKER_FILE => UploadStickerFile::execute($bot, $parameters), self::CREATE_NEW_STICKER_SET => CreateNewStickerSet::execute($bot, $parameters), self::ADD_STICKER_TO_SET => AddStickerToSet::execute($bot, $parameters), + self::SET_STICKER_POSITION_IN_SET => SetStickerPositionInSet::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Methods/SetStickerPositionInSet.php b/src/TgBotLib/Methods/SetStickerPositionInSet.php new file mode 100644 index 0000000..32da1fb --- /dev/null +++ b/src/TgBotLib/Methods/SetStickerPositionInSet.php @@ -0,0 +1,38 @@ +value, $parameters)); + } + + /** + * @inheritDoc + */ + public static function getRequiredParameters(): ?array + { + return [ + 'sticker', + 'position' + ]; + } + + /** + * @inheritDoc + */ + public static function getOptionalParameters(): ?array + { + return null; + } + } \ No newline at end of file