Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Commit

Permalink
Group logging
Browse files Browse the repository at this point in the history
  • Loading branch information
duncte123 committed Sep 16, 2021
1 parent aadc7aa commit 1d2debf
Showing 1 changed file with 27 additions and 25 deletions.
52 changes: 27 additions & 25 deletions src/main/java/com/dunctebot/models/settings/GuildSetting.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ public class GuildSetting {
private boolean warnLogging = true;
// new feature: disable by default
private boolean memberLogging = false;
private boolean inviteLoggingEnabled = false;
private boolean messageLoggingEnabled = false;
//
private List<WarnAction> warnActions = List.of(
new WarnAction(WarnAction.Type.KICK, 3)/*,
Expand All @@ -91,8 +93,6 @@ public class GuildSetting {

private int youngAccountThreshold = -1;
private boolean youngAccountBanEnabled = false;
private boolean inviteLoggingEnabled = false;
private boolean messageLoggingEnabled = false;

@JsonCreator
public GuildSetting(@JsonProperty("guildId") long guildId) {
Expand Down Expand Up @@ -348,6 +348,7 @@ public GuildSetting setSpamThreshold(int spamThreshold) {
return this;
}

/// <editor-fold desc="logging settings" defaultstate="collapsed">
@JsonProperty("banLogging")
public boolean isBanLogging() {
return this.banLogging;
Expand Down Expand Up @@ -414,6 +415,30 @@ public GuildSetting setMemberLogging(boolean memberLogging) {
return this;
}

@JsonProperty("invite_logging")
public boolean isInviteLogging() {
return this.inviteLoggingEnabled;
}

@JsonProperty("invite_logging")
public GuildSetting setInviteLogging(boolean enabled) {
this.inviteLoggingEnabled = enabled;

return this;
}

@JsonProperty("message_logging")
public boolean isMessageLogging() {
return this.messageLoggingEnabled;
}

@JsonProperty("message_logging")
public GuildSetting setMessageLogging(boolean enabled) {
this.messageLoggingEnabled = enabled;
return this;
}
/// </editor-fold>

@JsonProperty("filterType")
public ProfanityFilterType getFilterType() {
return this.filterType;
Expand Down Expand Up @@ -498,29 +523,6 @@ public GuildSetting setYoungAccountBanEnabled(boolean enabled) {
return this;
}

@JsonProperty("invite_logging")
public boolean isInviteLogging() {
return this.inviteLoggingEnabled;
}

@JsonProperty("invite_logging")
public GuildSetting setInviteLogging(boolean enabled) {
this.inviteLoggingEnabled = enabled;

return this;
}

@JsonProperty("message_logging")
public boolean isMessageLogging() {
return this.messageLoggingEnabled;
}

@JsonProperty("message_logging")
public GuildSetting setMessageLogging(boolean enabled) {
this.messageLoggingEnabled = enabled;
return this;
}

@JsonIgnore
public Object call(String methodName) {
try {
Expand Down

0 comments on commit 1d2debf

Please sign in to comment.