Skip to content

Commit adb2a6a

Browse files
Hide Dormant Channels Field if the Dormant Category is empty
1 parent 92e7655 commit adb2a6a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/net/javadiscord/javabot/systems/help/HelpChannelUpdater.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,9 @@ private void updateHelpOverview() {
425425
if (!reservedHelpChannels.isEmpty()) {
426426
builder.addField("Reserved Help Channels", reservedHelpChannels.toString(), false);
427427
}
428-
builder.addField("Dormant Help Channels", String.format("%s dormant channels", config.getDormantChannelCategory().getTextChannels().size()), false);
428+
if (!config.getDormantChannelCategory().getTextChannels().isEmpty()) {
429+
builder.addField("Dormant Help Channels", String.format("%s dormant channels", config.getDormantChannelCategory().getTextChannels().size()), false);
430+
}
429431
return builder.build();
430432
}
431433
}

0 commit comments

Comments
 (0)