diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index 6715ce9..923586a 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -70,6 +70,7 @@ use TgBotLib\Methods\UnbanChatMember; use TgBotLib\Methods\UnbanChatSenderChat; use TgBotLib\Methods\UnpinAllChatMessages; + use TgBotLib\Methods\UnpinAllForumTopicMessages; use TgBotLib\Methods\UnpinChatMessage; enum Methods : string @@ -140,6 +141,7 @@ case CLOSE_FORUM_TOPIC = 'closeForumTopic'; case REOPEN_FORUM_TOPIC = 'reopenForumTopic'; case DELETE_FORUM_TOPIC = 'deleteForumTopic'; + case UNPIN_ALLL_FORUM_TOPIC_MESSAGES = 'UnpinAllForumTopicMessages'; /** * Executes a command on the provided bot with the given parameters. @@ -219,6 +221,7 @@ self::CLOSE_FORUM_TOPIC => CloseForumTopic::execute($bot, $parameters), self::REOPEN_FORUM_TOPIC => ReopenForumTopic::execute($bot, $parameters), self::DELETE_FORUM_TOPIC => DeleteForumTopic::execute($bot, $parameters), + self::UNPIN_ALLL_FORUM_TOPIC_MESSAGES => UnpinAllForumTopicMessages::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Methods/UnpinAllForumTopicMessages.php b/src/TgBotLib/Methods/UnpinAllForumTopicMessages.php new file mode 100644 index 0000000..ec72ab1 --- /dev/null +++ b/src/TgBotLib/Methods/UnpinAllForumTopicMessages.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