1
1
package org .togetherjava .tjbot .config ;
2
2
3
3
import com .fasterxml .jackson .annotation .JsonCreator ;
4
- import com .fasterxml .jackson .annotation .JsonProperty ;
5
4
import com .fasterxml .jackson .annotation .JsonRootName ;
6
5
7
6
import java .util .List ;
8
7
import java .util .Objects ;
9
8
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
+ */
10
15
@ JsonRootName ("starboard" )
11
16
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
+ */
12
23
@ 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 );
18
27
}
19
28
20
29
/**
21
30
* 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()}.
23
33
* <p>
24
34
* Empty to deactivate the feature.
25
35
*
@@ -31,8 +41,8 @@ public List<String> emojiNames() {
31
41
}
32
42
33
43
/**
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.
36
46
*
37
47
* @return the name of the channel with the starboard
38
48
*/
0 commit comments