diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index eebe47a..1e6c4db 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -9,6 +9,7 @@ use TgBotLib\Methods\BanChatMember; use TgBotLib\Methods\BanChatSenderChat; use TgBotLib\Methods\Close; + use TgBotLib\Methods\CloseForumTopic; use TgBotLib\Methods\CopyMessage; use TgBotLib\Methods\CopyMessages; use TgBotLib\Methods\CreateChatInviteLink; @@ -134,6 +135,7 @@ case GET_FORUM_TOPIC_ICON_STICKERS = 'getForumTopicIconStickers'; case CREATE_FORUM_TOPIC = 'createForumTopic'; case EDIT_FORUM_TOPIC = 'editForumTopic'; + case CLOSE_FORUM_TOPIC = 'closeForumTopic'; /** * Executes a command on the provided bot with the given parameters. @@ -210,6 +212,7 @@ self::GET_FORUM_TOPIC_ICON_STICKERS => GetForumTopicIconStickers::execute($bot, $parameters), self::CREATE_FORUM_TOPIC => CreateForumTopic::execute($bot, $parameters), self::EDIT_FORUM_TOPIC => EditForumTopic::execute($bot, $parameters), + self::CLOSE_FORUM_TOPIC => CloseForumTopic::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Methods/CloseForumTopic.php b/src/TgBotLib/Methods/CloseForumTopic.php new file mode 100644 index 0000000..e3bf65e --- /dev/null +++ b/src/TgBotLib/Methods/CloseForumTopic.php @@ -0,0 +1,38 @@ +value, $parameters))); + } + + /** + * @inheritDoc + */ + public static function getRequiredParameters(): ?array + { + return [ + 'chat_id', + 'message_thread_id' + ]; + } + + /** + * @inheritDoc + */ + public static function getOptionalParameters(): ?array + { + return null; + } + } \ No newline at end of file