From 80751efaef9d05a2345de039e17fb90ae0b37b13 Mon Sep 17 00:00:00 2001 From: alphaBEE Date: Wed, 25 Oct 2023 22:54:26 +0530 Subject: [PATCH 1/3] javadoc fix transfer feature --- .../features/moderation/TransferQuestionCommand.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/application/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java b/application/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java index e82387744e..26aff83c52 100644 --- a/application/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java +++ b/application/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java @@ -33,6 +33,16 @@ import java.util.function.Supplier; import java.util.regex.Pattern; +/** + * This command can be used to transfer questions asked in any channel to helper forum. Transfer + * action generates a prefilled modal menu with title and contents of message which can be changed + * by the user of command. On submission, it creates a new post in helper forum(also mentions the + * author) followed by sending a dm to user and deleting the original message from chat. If dm + * fails(user blocked tj-bot), user is notified in same channel. + *

+ * The command fails if user lacks permissions, or if used on message from a bot. + */ + public final class TransferQuestionCommand extends BotCommandAdapter implements MessageContextCommand { private static final String COMMAND_NAME = "transfer-question"; From a9c0d93a26b6a23e0374c285f84a5c1548048af7 Mon Sep 17 00:00:00 2001 From: alphaBEE <61616007+ankitsmt211@users.noreply.github.com> Date: Thu, 26 Oct 2023 14:48:38 +0530 Subject: [PATCH 2/3] refactor javadoc Co-authored-by: Daniel Tischner --- .../features/moderation/TransferQuestionCommand.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/application/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java b/application/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java index 26aff83c52..2d43f63ee6 100644 --- a/application/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java +++ b/application/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java @@ -34,15 +34,11 @@ import java.util.regex.Pattern; /** - * This command can be used to transfer questions asked in any channel to helper forum. Transfer - * action generates a prefilled modal menu with title and contents of message which can be changed - * by the user of command. On submission, it creates a new post in helper forum(also mentions the - * author) followed by sending a dm to user and deleting the original message from chat. If dm - * fails(user blocked tj-bot), user is notified in same channel. - *

- * The command fails if user lacks permissions, or if used on message from a bot. + * This command can be used to transfer questions asked in any channel to the helper forum. + * The user is given the chance to edit details of the question and upon submitting, + * the original message will be deleted and recreated in the helper forum. + * The original author is notified and redirected to the new post. */ - public final class TransferQuestionCommand extends BotCommandAdapter implements MessageContextCommand { private static final String COMMAND_NAME = "transfer-question"; From 34884b56b9de2264225ce62f8b27d4786146ef9c Mon Sep 17 00:00:00 2001 From: alphaBEE Date: Thu, 26 Oct 2023 15:00:51 +0530 Subject: [PATCH 3/3] spotless fix --- .../features/moderation/TransferQuestionCommand.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java b/application/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java index 2d43f63ee6..f8c6c91d25 100644 --- a/application/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java +++ b/application/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java @@ -34,10 +34,10 @@ import java.util.regex.Pattern; /** - * This command can be used to transfer questions asked in any channel to the helper forum. - * The user is given the chance to edit details of the question and upon submitting, - * the original message will be deleted and recreated in the helper forum. - * The original author is notified and redirected to the new post. + * This command can be used to transfer questions asked in any channel to the helper forum. The user + * is given the chance to edit details of the question and upon submitting, the original message + * will be deleted and recreated in the helper forum. The original author is notified and redirected + * to the new post. */ public final class TransferQuestionCommand extends BotCommandAdapter implements MessageContextCommand {