diff --git a/src/main/java/link/locutus/discord/db/guild/GuildCategorySetting.java b/src/main/java/link/locutus/discord/db/guild/GuildCategorySetting.java index 6e059c84..601fabf2 100644 --- a/src/main/java/link/locutus/discord/db/guild/GuildCategorySetting.java +++ b/src/main/java/link/locutus/discord/db/guild/GuildCategorySetting.java @@ -2,6 +2,7 @@ import link.locutus.discord.commands.manager.v2.binding.Key; import link.locutus.discord.db.GuildDB; +import net.dv8tion.jda.api.entities.User; import net.dv8tion.jda.api.entities.channel.concrete.Category; import net.dv8tion.jda.api.entities.IMentionable; @@ -11,7 +12,7 @@ public GuildCategorySetting(GuildSettingCategory category) { } @Override - public Category validate(GuildDB db, Category value) { + public Category validate(GuildDB db, User user, Category value) { return validateCategory(db, value); } diff --git a/src/main/java/link/locutus/discord/db/guild/GuildChannelSetting.java b/src/main/java/link/locutus/discord/db/guild/GuildChannelSetting.java index 02d48440..f91f8129 100644 --- a/src/main/java/link/locutus/discord/db/guild/GuildChannelSetting.java +++ b/src/main/java/link/locutus/discord/db/guild/GuildChannelSetting.java @@ -3,6 +3,7 @@ import link.locutus.discord.commands.manager.v2.binding.Key; import link.locutus.discord.db.GuildDB; import net.dv8tion.jda.api.entities.IMentionable; +import net.dv8tion.jda.api.entities.User; import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel; public abstract class GuildChannelSetting extends GuildSetting { @@ -11,7 +12,7 @@ public GuildChannelSetting(GuildSettingCategory category) { } @Override - public MessageChannel validate(GuildDB db, MessageChannel value) { + public MessageChannel validate(GuildDB db, User user, MessageChannel value) { return validateChannel(db, value); } diff --git a/src/main/java/link/locutus/discord/db/guild/GuildResourceSetting.java b/src/main/java/link/locutus/discord/db/guild/GuildResourceSetting.java index c80d4651..c04a2d22 100644 --- a/src/main/java/link/locutus/discord/db/guild/GuildResourceSetting.java +++ b/src/main/java/link/locutus/discord/db/guild/GuildResourceSetting.java @@ -5,6 +5,7 @@ import link.locutus.discord.util.MathMan; import link.locutus.discord.util.PW; import link.locutus.discord.util.math.ArrayUtil; +import net.dv8tion.jda.api.entities.User; import java.nio.charset.StandardCharsets; import java.util.Map; @@ -15,7 +16,7 @@ public GuildResourceSetting(GuildSettingCategory category) { } @Override - public Map validate(GuildDB db, Map value) { + public Map validate(GuildDB db, User user, Map value) { // ensure amounts are positive for (Map.Entry entry : value.entrySet()) { if (entry.getValue() < 0) { diff --git a/src/main/java/link/locutus/discord/db/guild/GuildSetting.java b/src/main/java/link/locutus/discord/db/guild/GuildSetting.java index ad9caf78..dabbfdd2 100644 --- a/src/main/java/link/locutus/discord/db/guild/GuildSetting.java +++ b/src/main/java/link/locutus/discord/db/guild/GuildSetting.java @@ -541,7 +541,7 @@ public T allowedAndValidate(GuildDB db, User user, T value) { public String setAndValidate(GuildDB db, User user, T value) { value = allowedAndValidate(db, user, value); - return set(db, value); + return set(db, user, value); } public GuildSetting requiresAllies() {