Skip to content

Commit

Permalink
Minor changes from CR
Browse files Browse the repository at this point in the history
* Empty lines for readability
* Slightly rephrased a user facing string
  • Loading branch information
Zabuzard committed Jan 24, 2022
1 parent 8d1c998 commit 546b5d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,15 @@ public void updateStatusFor(@NotNull Guild guild) {
"Guild %s is not configured in the free command system."
.formatted(guild.getName()));
}

long channelId = guildIdToStatusChannel.get(guild.getIdLong());
TextChannel channel = guild.getTextChannelById(channelId);

if (channel == null) {
throw new IllegalStateException("Status channel %d does not exist in guild %s"
.formatted(channelId, guild.getName()));
}

return channel;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ enum UserStrings {
Command not ready please try again in a minute.
"""),
NOT_MONITORED_ERROR("This channel is not being monitored for free/busy status. If you"
+ " believe this channel should be part of the free/busy status system, please discuss it"
+ " with a moderator."),
+ " believe this channel should be part of the free/busy status system, please"
+ " consult a moderator."),
NOT_CONFIGURED_ERROR("""
This guild (%s) is not configured to use the '/free' command.
Please add entries in the config, restart the bot and try again.
Expand Down

0 comments on commit 546b5d1

Please sign in to comment.