From 95020c9ed9e5938fd78d39ee1cbbeecfbd4dc39c Mon Sep 17 00:00:00 2001 From: netkas Date: Wed, 13 Nov 2024 19:27:40 -0500 Subject: [PATCH] Add GetChatMenuButton method --- src/TgBotLib/Enums/Methods.php | 3 ++ src/TgBotLib/Methods/GetChatMenuButton.php | 38 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 src/TgBotLib/Methods/GetChatMenuButton.php diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index b941066..30bfb72 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -35,6 +35,7 @@ use TgBotLib\Methods\GetChatAdministrators; use TgBotLib\Methods\GetChatMember; use TgBotLib\Methods\GetChatMemberCount; + use TgBotLib\Methods\GetChatMenuButton; use TgBotLib\Methods\GetFile; use TgBotLib\Methods\GetForumTopicIconStickers; use TgBotLib\Methods\GetMe; @@ -180,6 +181,7 @@ case SET_MY_SHORT_DESCRIPTION = 'setMyShortDescription'; case GET_MY_SHORT_DESCRIPTION = 'getMyShortDescription'; case SET_CHAT_MENU_BUTTON = 'setChatMenuButton'; + case GET_CHAT_MENU_BUTTON = 'getChatMenuButton'; /** * Executes a command on the provided bot with the given parameters. @@ -279,6 +281,7 @@ self::SET_MY_SHORT_DESCRIPTION => SetMyShortDescription::execute($bot, $parameters), self::GET_MY_SHORT_DESCRIPTION => GetMyShortDescription::execute($bot, $parameters), self::SET_CHAT_MENU_BUTTON => SetChatMenuButton::execute($bot, $parameters), + self::GET_CHAT_MENU_BUTTON => GetChatMenuButton::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Methods/GetChatMenuButton.php b/src/TgBotLib/Methods/GetChatMenuButton.php new file mode 100644 index 0000000..387b434 --- /dev/null +++ b/src/TgBotLib/Methods/GetChatMenuButton.php @@ -0,0 +1,38 @@ +value, $parameters))); + } + + /** + * @inheritDoc + */ + public static function getRequiredParameters(): ?array + { + return null; + } + + /** + * @inheritDoc + */ + public static function getOptionalParameters(): ?array + { + return [ + 'chat_id' + ]; + } + } \ No newline at end of file