55
66import java .util .List ;
77import java .util .Objects ;
8+ import java .util .regex .Pattern ;
89
910/**
1011 * Starboard Config
1112 *
1213 * @param emojiNames the List of emojis which are recognized by the starboard
13- * @param channelName the name of the channel with the starboard
14+ * @param channelPattern the pattern of the channel with the starboard
1415 */
1516@ JsonRootName ("starboard" )
16- public record StarboardConfig (List <String > emojiNames , String channelName ) {
17+ public record StarboardConfig (List <String > emojiNames , Pattern channelPattern ) {
1718 /**
1819 * Creates a Starboard config.
1920 *
2021 * @param emojiNames the List of emojis which are recognized by the starboard
21- * @param channelName the name of the channel with the starboard
22+ * @param channelPattern the pattern of the channel with the starboard
2223 */
2324 @ JsonCreator (mode = JsonCreator .Mode .PROPERTIES )
2425 public StarboardConfig {
2526 Objects .requireNonNull (emojiNames );
26- Objects .requireNonNull (channelName );
27+ Objects .requireNonNull (channelPattern );
2728 }
2829
2930 /**
3031 * Gets the list of emotes that are recognized by the starboard feature. A message that is
3132 * reacted on with an emote in this list will be reposted in a special channel
32- * {@link #channelName ()}.
33+ * {@link #channelPattern ()}.
3334 * <p>
3435 * Empty to deactivate the feature.
3536 *
@@ -41,13 +42,12 @@ public List<String> emojiNames() {
4142 }
4243
4344 /**
44- * Gets the name of the channel with the starboard. Deactivate by using a non-existent channel
45- * name.
45+ * Gets the pattern of the channel with the starboard. Deactivate by using a non-existent
46+ * channel name.
4647 *
47- * @return the name of the channel with the starboard
48+ * @return the pattern of the channel with the starboard
4849 */
49- @ Override
50- public String channelName () {
51- return channelName ;
50+ public Pattern channelPattern () {
51+ return channelPattern ;
5252 }
5353}
0 commit comments