Skip to content

Commit

Permalink
Update GuildKey.java
Browse files Browse the repository at this point in the history
  • Loading branch information
xdnw committed Jun 24, 2024
1 parent f0c9240 commit 9b5f3fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/link/locutus/discord/db/guild/GuildKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ public String registerAlliance(@Me GuildDB db, @Me User user, Set<DBAlliance> al
Set<Integer> toAdd = alliances.stream().map(DBAlliance::getId).collect(Collectors.toSet());
for (DBAlliance alliance : alliances) {
if (existing.contains(alliance.getId())) {
throw new IllegalArgumentException("Alliance " + alliance.getName() + " (id: " + alliance.getId() + ") is already registered (registered: " + StringMan.join(existing, ",") + ")");
throw new IllegalArgumentException("Alliance " + alliance.getName() + " (id: " + alliance.getId() + ") is already registered (registered: " + StringMan.join(existing, ",") + ")\n" +
"To set multiple alliances, first delete the currently set alliance ids: " + CM.settings.delete.cmd.key(GuildKey.ALLIANCE_ID.name()));
}
}
toAdd = ALLIANCE_ID.allowedAndValidate(db, user, toAdd);
Expand Down

0 comments on commit 9b5f3fe

Please sign in to comment.