diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index 9b8fc1d..efa7490 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -10,6 +10,7 @@ use TgBotLib\Methods\BanChatSenderChat; use TgBotLib\Methods\Close; use TgBotLib\Methods\CloseForumTopic; + use TgBotLib\Methods\CloseGeneralForumTopic; use TgBotLib\Methods\CopyMessage; use TgBotLib\Methods\CopyMessages; use TgBotLib\Methods\CreateChatInviteLink; @@ -144,6 +145,7 @@ case DELETE_FORUM_TOPIC = 'deleteForumTopic'; case UNPIN_ALLL_FORUM_TOPIC_MESSAGES = 'UnpinAllForumTopicMessages'; case EDIT_GENERAL_FORUM_TOPIC = 'editGeneralForumTopic'; + case CLOSE_GENERAL_FORUM_TOPIC = 'closeGeneralForumTopic'; /** * Executes a command on the provided bot with the given parameters. @@ -225,6 +227,7 @@ self::DELETE_FORUM_TOPIC => DeleteForumTopic::execute($bot, $parameters), self::UNPIN_ALLL_FORUM_TOPIC_MESSAGES => UnpinAllForumTopicMessages::execute($bot, $parameters), self::EDIT_GENERAL_FORUM_TOPIC => EditGeneralForumTopic::execute($bot, $parameters), + self::CLOSE_GENERAL_FORUM_TOPIC => CloseGeneralForumTopic::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Methods/CloseGeneralForumTopic.php b/src/TgBotLib/Methods/CloseGeneralForumTopic.php new file mode 100644 index 0000000..29bb374 --- /dev/null +++ b/src/TgBotLib/Methods/CloseGeneralForumTopic.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