diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index 66ab886..6715ce9 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -18,6 +18,7 @@ use TgBotLib\Methods\DeclineChatJoinRequest; use TgBotLib\Methods\DeleteChatPhoto; use TgBotLib\Methods\DeleteChatStickerSet; + use TgBotLib\Methods\DeleteForumTopic; use TgBotLib\Methods\DeleteWebhook; use TgBotLib\Methods\EditChatInviteLink; use TgBotLib\Methods\EditChatSubscriptionInviteLink; @@ -138,6 +139,7 @@ case EDIT_FORUM_TOPIC = 'editForumTopic'; case CLOSE_FORUM_TOPIC = 'closeForumTopic'; case REOPEN_FORUM_TOPIC = 'reopenForumTopic'; + case DELETE_FORUM_TOPIC = 'deleteForumTopic'; /** * Executes a command on the provided bot with the given parameters. @@ -216,6 +218,7 @@ self::EDIT_FORUM_TOPIC => EditForumTopic::execute($bot, $parameters), self::CLOSE_FORUM_TOPIC => CloseForumTopic::execute($bot, $parameters), self::REOPEN_FORUM_TOPIC => ReopenForumTopic::execute($bot, $parameters), + self::DELETE_FORUM_TOPIC => DeleteForumTopic::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Methods/DeleteForumTopic.php b/src/TgBotLib/Methods/DeleteForumTopic.php new file mode 100644 index 0000000..ba4ca02 --- /dev/null +++ b/src/TgBotLib/Methods/DeleteForumTopic.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