From 9468bdda90dcdc767783cbadaa9b64b2b720b598 Mon Sep 17 00:00:00 2001 From: netkas Date: Fri, 15 Nov 2024 15:14:10 -0500 Subject: [PATCH] Add SetCustomEmojiStickerSetThumbnail method --- src/TgBotLib/Enums/Methods.php | 3 ++ .../SetCustomEmojiStickerSetThumbnail.php | 39 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 src/TgBotLib/Methods/SetCustomEmojiStickerSetThumbnail.php diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index f9b6698..394687b 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -94,6 +94,7 @@ use TgBotLib\Methods\SetChatPhoto; use TgBotLib\Methods\SetChatStickerSet; use TgBotLib\Methods\SetChatTitle; + use TgBotLib\Methods\SetCustomEmojiStickerSetThumbnail; use TgBotLib\Methods\SetMessageReaction; use TgBotLib\Methods\SetMyCommands; use TgBotLib\Methods\SetMyDefaultAdministratorRights; @@ -230,6 +231,7 @@ case SET_STICKER_MASK_POSITION = 'setStickerMaskPosition'; case SET_STICKER_SET_TITLE = 'setStickerSetTitle'; case SET_STICKER_SET_THUMBNAIL = 'setStickerSetThumbnail'; + case SET_CUSTOM_EMOJI_STICKER_SET_THUMBNAIL = 'setCustomEmojiStickerSetThumbnail'; /** * Executes a command on the provided bot with the given parameters. @@ -354,6 +356,7 @@ self::SET_STICKER_MASK_POSITION => SetStickerMaskPosition::execute($bot, $parameters), self::SET_STICKER_SET_TITLE => SetStickerSetTitle::execute($bot, $parameters), self::SET_STICKER_SET_THUMBNAIL => SetStickerSetThumbnail::execute($bot, $parameters), + self::SET_CUSTOM_EMOJI_STICKER_SET_THUMBNAIL => SetCustomEmojiStickerSetThumbnail::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Methods/SetCustomEmojiStickerSetThumbnail.php b/src/TgBotLib/Methods/SetCustomEmojiStickerSetThumbnail.php new file mode 100644 index 0000000..98c238c --- /dev/null +++ b/src/TgBotLib/Methods/SetCustomEmojiStickerSetThumbnail.php @@ -0,0 +1,39 @@ +value, $parameters)); + } + + /** + * @inheritDoc + */ + public static function getRequiredParameters(): ?array + { + return [ + 'name' + ]; + } + + /** + * @inheritDoc + */ + public static function getOptionalParameters(): ?array + { + return [ + 'custom_emoji_id' + ]; + } + } \ No newline at end of file