Skip to content

Commit c3c1579

Browse files
committed
doc(QuoteBoardForwarder.java): improve JavaDoc
Since 1ade409 (refactor: code review addressed by Zabuzard, 2025-06-28) primarily contains a generaly vague JavaDoc describing what the `QuoteBoardForwarder.java` class is doing, a more descriptive one replaces it. Signed-off-by: Chris Sdogkos <[email protected]>
1 parent 8017ada commit c3c1579

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

application/src/main/java/org/togetherjava/tjbot/features/basic/QuoteBoardForwarder.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,17 @@
1919
import java.util.regex.Pattern;
2020

2121
/**
22-
* Manager for the cool messages board. It appends highly-voted text messages to a separate channel
23-
* where members of the guild can see a list of all of them. User reacts to a message with a
24-
* configured emoji it then forwards this message to the configured quote board channel
22+
* Listens for reaction-add events and turns popular messages into “quotes”.
23+
* <p>
24+
* When someone reacts to a message with the configured emoji, the listener counts how many users
25+
* have used that same emoji. If the total meets or exceeds the minimum threshold and the bot has
26+
* not processed the message before, it copies (forwards) the message to the first text channel
27+
* whose name matches the configured quote-board pattern, then reacts to the original message itself
28+
* to mark it as handled (and to not let people spam react a message and give a way to the bot to
29+
* know that a message has been quoted before).
30+
* <p>
31+
* Key points: - Trigger emoji, minimum vote count and quote-board channel pattern are supplied via
32+
* {@code QuoteBoardConfig}.
2533
*/
2634
public final class QuoteBoardForwarder extends MessageReceiverAdapter {
2735

0 commit comments

Comments
 (0)