Skip to content

Commit bd4e15e

Browse files
Changes from CR
1 parent 597f1c7 commit bd4e15e

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

application/config.json.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,6 @@
9797
}
9898
"starboard": {
9999
"emojiNames" : ["star"],
100-
"starboard": "oofs_and_lmaos"
100+
"channelName": "starboard"
101101
}
102102
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
@JsonRootName("starboard")
1010
public final class StarboardConfig {
1111
private final List<String> emojiNames;
12-
private final String starboard;
12+
private final String channelName;
1313

1414
@JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
1515
public StarboardConfig(
1616
@JsonProperty(value = "emojiNames", required = true) List<String> emojiNames,
17-
@JsonProperty(value = "channelName", required = true) String starboard) {
17+
@JsonProperty(value = "channelName", required = true) String channelName) {
1818
this.emojiNames = emojiNames;
19-
this.starboard = starboard;
19+
this.channelName = channelName;
2020
}
2121

2222
/**
@@ -38,7 +38,7 @@ public List<String> getEmojiNames() {
3838
* @return the name of the channel with the starboard
3939
*/
4040

41-
public String getStarboard() {
42-
return starboard;
41+
public String getChannelName() {
42+
return channelName;
4343
}
4444
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ public void onMessageReactionAdd(@NotNull MessageReactionAddEvent event) {
3939
return;
4040
}
4141
Optional<TextChannel> starboardChannel =
42-
guild.getTextChannelsByName(config.getStarboard(), false).stream().findFirst();
42+
guild.getTextChannelsByName(config.getChannelName(), false).stream().findFirst();
4343
if (starboardChannel.isEmpty()) {
4444
logger.warn("There is no channel for the starboard in the guild with the name {}",
45-
config.getStarboard());
45+
config.getChannelName());
4646
return;
4747
}
4848
event.getChannel()

0 commit comments

Comments
 (0)