Skip to content

Commit

Permalink
Change mail to fasle by default for beige violation
Browse files Browse the repository at this point in the history
  • Loading branch information
xdnw committed Jan 6, 2024
1 parent cce1d89 commit 6236bb6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/link/locutus/discord/db/GuildHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -2203,13 +2203,14 @@ public void beigeAlert(AbstractCursor root) {

Role milcom = Roles.ENEMY_BEIGE_ALERT_AUDITOR.toRole(db.getGuild());
if (!allowed) {
boolean sendMail = GuildKey.BEIGE_VIOLATION_MAIL.getOrNull(db) != Boolean.FALSE;
boolean sendMail = GuildKey.BEIGE_VIOLATION_MAIL.getOrNull(db) == Boolean.TRUE;

String ping = "";
if (milcom != null) ping += milcom.getAsMention();
if (user != null) ping += user.getAsMention();

String explanation = getBeigeCyclingInfo(allowedReasons, !allowed);
explanation += "\n\nSent from " + guild.toString();

if (!ping.isEmpty()) {
RateLimitUtil.queueWhenFree(channel.sendMessage("^" + ping));
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/link/locutus/discord/db/guild/GuildKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -1700,7 +1700,7 @@ public String BEIGE_VIOLATION_MAIL(@Me GuildDB db, @Me User user, boolean value)
@Override
public String help() {
return "Whether to send a mail to the nation when a beige violation occurs\n" +
"Default: True";
"Default: False";
}
}.setupRequirements(f -> f.requires(ENEMY_BEIGED_ALERT_VIOLATIONS).requireValidAlliance().requires(ALLOWED_BEIGE_REASONS));

Expand Down

0 comments on commit 6236bb6

Please sign in to comment.