From 18bd8ce69ecb4fe4ac33a8c92052ea75ae06183a Mon Sep 17 00:00:00 2001 From: netkas Date: Thu, 7 Nov 2024 00:54:14 -0500 Subject: [PATCH] Add 'HideGeneralForumTopic' method --- src/TgBotLib/Enums/Methods.php | 3 ++ .../Methods/HideGeneralForumTopic.php | 37 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 src/TgBotLib/Methods/HideGeneralForumTopic.php diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index a3ee530..d8a0e8f 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -38,6 +38,7 @@ use TgBotLib\Methods\GetUpdates; use TgBotLib\Methods\GetUserProfilePhotos; use TgBotLib\Methods\GetWebhookInfo; + use TgBotLib\Methods\HideGeneralForumTopic; use TgBotLib\Methods\LeaveChat; use TgBotLib\Methods\Logout; use TgBotLib\Methods\PinChatMessage; @@ -148,6 +149,7 @@ case EDIT_GENERAL_FORUM_TOPIC = 'editGeneralForumTopic'; case CLOSE_GENERAL_FORUM_TOPIC = 'closeGeneralForumTopic'; case REOPEN_GENERAL_FORUM_TOPIC = 'reopenGeneralForumTopic'; + case HIDE_GENERAL_FORUM_TOPIC = 'hideGeneralForumTopic'; /** * Executes a command on the provided bot with the given parameters. @@ -231,6 +233,7 @@ self::EDIT_GENERAL_FORUM_TOPIC => EditGeneralForumTopic::execute($bot, $parameters), self::CLOSE_GENERAL_FORUM_TOPIC => CloseGeneralForumTopic::execute($bot, $parameters), self::REOPEN_GENERAL_FORUM_TOPIC => ReopenGeneralForumTopic::execute($bot, $parameters), + self::HIDE_GENERAL_FORUM_TOPIC => HideGeneralForumTopic::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Methods/HideGeneralForumTopic.php b/src/TgBotLib/Methods/HideGeneralForumTopic.php new file mode 100644 index 0000000..e926def --- /dev/null +++ b/src/TgBotLib/Methods/HideGeneralForumTopic.php @@ -0,0 +1,37 @@ +value, $parameters))); + } + + /** + * @inheritDoc + */ + public static function getRequiredParameters(): ?array + { + return [ + 'chat_id' + ]; + } + + /** + * @inheritDoc + */ + public static function getOptionalParameters(): ?array + { + return null; + } + } \ No newline at end of file