Skip to content

Commit 7447e75

Browse files
Javadoc stuff
1 parent 7b7fb93 commit 7447e75

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

application/src/main/java/org/togetherjava/tjbot/config/Config.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,9 @@ public JShellConfig getJshell() {
356356
}
357357

358358
/**
359-
* Gets the config for the Starboard Contains the List of emoji names recognized by the
360-
* starboard as well as the name of the channel with the starboard.
359+
* Gets the config for the Starboard. The starboard displays certain messages in a special
360+
* channel {@link StarboardConfig#channelName()} if a user reacts with one of the recognized
361+
* emojis{@link StarboardConfig#emojiNames()}
361362
*
362363
* @return the config of the Starboard
363364
*/

application/src/main/java/org/togetherjava/tjbot/config/StarboardConfig.java

+19-9
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,35 @@
11
package org.togetherjava.tjbot.config;
22

33
import com.fasterxml.jackson.annotation.JsonCreator;
4-
import com.fasterxml.jackson.annotation.JsonProperty;
54
import com.fasterxml.jackson.annotation.JsonRootName;
65

76
import java.util.List;
87
import java.util.Objects;
98

9+
/**
10+
* Starboard Config
11+
*
12+
* @param emojiNames the List of emojis which are recognized by the starboard
13+
* @param channelName the name of the channel with the starboard
14+
*/
1015
@JsonRootName("starboard")
1116
public record StarboardConfig(List<String> emojiNames, String channelName) {
17+
/**
18+
* Creates a Starboard config.
19+
*
20+
* @param emojiNames the List of emojis which are recognized by the starboard
21+
* @param channelName the name of the channel with the starboard
22+
*/
1223
@JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
13-
public StarboardConfig(
14-
@JsonProperty(value = "emojiNames", required = true) List<String> emojiNames,
15-
@JsonProperty(value = "channelName", required = true) String channelName) {
16-
this.emojiNames = Objects.requireNonNull(emojiNames);
17-
this.channelName = Objects.requireNonNull(channelName);
24+
public StarboardConfig {
25+
Objects.requireNonNull(emojiNames);
26+
Objects.requireNonNull(channelName);
1827
}
1928

2029
/**
2130
* Gets the list of emotes that are recognized by the starboard feature. A message that is
22-
* reacted on with an emote in this list will be reposted in a special channel.
31+
* reacted on with an emote in this list will be reposted in a special channel
32+
* {@link #channelName()}.
2333
* <p>
2434
* Empty to deactivate the feature.
2535
*
@@ -31,8 +41,8 @@ public List<String> emojiNames() {
3141
}
3242

3343
/**
34-
* Gets the name of the channel with the starboard Deactivate by using a non-existent channel
35-
* name
44+
* Gets the name of the channel with the starboard. Deactivate by using a non-existent channel
45+
* name.
3646
*
3747
* @return the name of the channel with the starboard
3848
*/

0 commit comments

Comments
 (0)