Search in sources :

Example 1 with Warn

use of com.sx4.bot.entities.mod.action.Warn in project Sx4 by sx4-discord-bot.

the class WarnCommand method view.

@Command(value = "view", description = "View the amount of warnings a specific user is on")
@CommandId(259)
@Examples({ "warn view @Shea#6653", "warn view Shea", "warn view 402557516728369153" })
@Redirects({ "warnings", "warns" })
public void view(Sx4CommandEvent event, @Argument(value = "user", endless = true) Member member) {
    List<Bson> pipeline = List.of(Aggregates.match(Filters.and(Filters.eq("userId", member.getIdLong()), Filters.eq("guildId", event.getGuild().getIdLong()))), Aggregates.project(Projections.computed("warnings", Operators.cond(Operators.or(Operators.isNull("$reset"), Operators.isNull("$warnings")), Operators.ifNull("$warnings", 0), Operators.max(0, Operators.subtract("$warnings", Operators.multiply(Operators.toInt(Operators.floor(Operators.divide(Operators.subtract(Operators.nowEpochSecond(), "$lastWarning"), "$reset.after"))), "$reset.amount")))))));
    event.getMongo().aggregateWarnings(pipeline).whenComplete((documents, exception) -> {
        if (ExceptionUtility.sendExceptionally(event, exception)) {
            return;
        }
        Document data = documents.isEmpty() ? MongoDatabase.EMPTY_DOCUMENT : documents.get(0);
        int warnings = data.getInteger("warnings", 0);
        event.reply("**" + member.getUser().getAsTag() + "** is currently on **" + warnings + "** warning" + (warnings == 1 ? "" : "s")).queue();
    });
}
Also used : Document(org.bson.Document) Bson(org.bson.conversions.Bson) Command(com.jockie.bot.core.command.Command) Sx4Command(com.sx4.bot.core.Sx4Command)

Example 2 with Warn

use of com.sx4.bot.entities.mod.action.Warn in project Sx4 by sx4-discord-bot.

the class WarnCommand method set.

@Command(value = "set", description = "Set the amount of warns a user has")
@CommandId(242)
@Redirects({ "set warns", "set warnings" })
@Examples({ "warn set @Shea#6653 2", "warn set Shea#6653 0", "warn set 402557516728369153 1" })
@AuthorPermissions(permissions = { Permission.MANAGE_SERVER })
public void set(Sx4CommandEvent event, @Argument(value = "user") Member member, @Argument(value = "warnings") int warnings) {
    if (member.canInteract(event.getMember())) {
        event.replyFailure("You cannot change the amount of warnings of someone higher or equal than your top role").queue();
        return;
    }
    Document warnData = event.getMongo().getGuildById(event.getGuild().getIdLong(), Projections.include("warn")).get("warn", MongoDatabase.EMPTY_DOCUMENT);
    boolean punishments = warnData.get("punishments", true);
    int maxWarning = punishments ? warnData.getList("config", Document.class, Warn.DEFAULT_CONFIG).stream().map(d -> d.getInteger("number")).max(Integer::compareTo).get() : Integer.MAX_VALUE;
    if (warnings > maxWarning) {
        event.replyFailure("The max amount of warnings you can give is **" + maxWarning + "**").queue();
        return;
    }
    Bson update = warnings == 0 ? Updates.unset("warnings") : Updates.combine(Updates.set("warnings", warnings), Updates.set("lastWarning", Clock.systemUTC().instant().getEpochSecond()));
    Bson filter = Filters.and(Filters.eq("userId", member.getIdLong()), Filters.eq("guildId", event.getGuild().getIdLong()));
    event.getMongo().updateWarnings(filter, update, new UpdateOptions().upsert(true)).whenComplete((result, exception) -> {
        if (ExceptionUtility.sendExceptionally(event, exception)) {
            return;
        }
        if (result.getModifiedCount() == 0 && result.getUpsertedId() == null) {
            event.replyFailure("That user already had that amount of warnings").queue();
            return;
        }
        event.replySuccess("That user now has **" + warnings + "** warning" + (warnings == 1 ? "" : "s")).queue();
    });
}
Also used : Document(org.bson.Document) MarkdownSanitizer(net.dv8tion.jda.api.utils.MarkdownSanitizer) Command(com.jockie.bot.core.command.Command) Permission(net.dv8tion.jda.api.Permission) MongoDatabase(com.sx4.bot.database.mongo.MongoDatabase) ModAction(com.sx4.bot.entities.mod.action.ModAction) Member(net.dv8tion.jda.api.entities.Member) TimedArgument(com.sx4.bot.entities.argument.TimedArgument) PagedResult(com.sx4.bot.paged.PagedResult) User(net.dv8tion.jda.api.entities.User) ArrayList(java.util.ArrayList) TimeAction(com.sx4.bot.entities.mod.action.TimeAction) Bson(org.bson.conversions.Bson) Alternative(com.sx4.bot.entities.argument.Alternative) Sx4CommandEvent(com.sx4.bot.core.Sx4CommandEvent) TimeUtility(com.sx4.bot.utility.TimeUtility) Duration(java.time.Duration) AlternativeOptions(com.sx4.bot.annotations.argument.AlternativeOptions) Reason(com.sx4.bot.entities.mod.Reason) com.mongodb.client.model(com.mongodb.client.model) com.sx4.bot.annotations.command(com.sx4.bot.annotations.command) Warn(com.sx4.bot.entities.mod.action.Warn) Argument(com.jockie.bot.core.argument.Argument) Limit(com.sx4.bot.annotations.argument.Limit) Action(com.sx4.bot.entities.mod.action.Action) Operators(com.sx4.bot.database.mongo.model.Operators) Sx4Command(com.sx4.bot.core.Sx4Command) NumberUtility(com.sx4.bot.utility.NumberUtility) ModUtility(com.sx4.bot.utility.ModUtility) CompletionException(java.util.concurrent.CompletionException) ModuleCategory(com.sx4.bot.category.ModuleCategory) List(java.util.List) Clock(java.time.Clock) ExceptionUtility(com.sx4.bot.utility.ExceptionUtility) Comparator(java.util.Comparator) Document(org.bson.Document) Bson(org.bson.conversions.Bson) Command(com.jockie.bot.core.command.Command) Sx4Command(com.sx4.bot.core.Sx4Command)

Example 3 with Warn

use of com.sx4.bot.entities.mod.action.Warn in project Sx4 by sx4-discord-bot.

the class ModUtility method performAction.

public static CompletableFuture<? extends Action> performAction(Sx4 bot, Action action, Member target, Member moderator, Reason reason) {
    Guild guild = target.getGuild();
    switch(action.getModAction()) {
        case WARN:
            return ModUtility.warn(bot, target, moderator, reason);
        case MUTE:
        case MUTE_EXTEND:
            if (!guild.getSelfMember().hasPermission(Permission.MANAGE_ROLES)) {
                return CompletableFuture.failedFuture(new BotPermissionException(Permission.MANAGE_ROLES));
            }
            return ModUtility.mute(bot, target, moderator, Duration.ofSeconds(((TimeAction) action).getDuration()), action.getModAction().isExtend(), reason);
        case KICK:
            if (!guild.getSelfMember().hasPermission(Permission.KICK_MEMBERS)) {
                return CompletableFuture.failedFuture(new BotPermissionException(Permission.KICK_MEMBERS));
            }
            if (!guild.getSelfMember().canInteract(target)) {
                return CompletableFuture.failedFuture(new BotHierarchyException("kick"));
            }
            if (!moderator.hasPermission(Permission.KICK_MEMBERS)) {
                return CompletableFuture.failedFuture(new AuthorPermissionException(Permission.KICK_MEMBERS));
            }
            return target.kick(ModUtility.getAuditReason(reason, moderator.getUser())).submit().thenApply($ -> {
                bot.getModActionManager().onModAction(new KickEvent(moderator, target.getUser(), reason));
                return action;
            });
        case TEMPORARY_BAN:
            if (!guild.getSelfMember().hasPermission(Permission.BAN_MEMBERS)) {
                return CompletableFuture.failedFuture(new BotPermissionException(Permission.BAN_MEMBERS));
            }
            if (!guild.getSelfMember().canInteract(target)) {
                return CompletableFuture.failedFuture(new BotHierarchyException("ban"));
            }
            if (!moderator.hasPermission(Permission.BAN_MEMBERS)) {
                return CompletableFuture.failedFuture(new AuthorPermissionException(Permission.BAN_MEMBERS));
            }
            long temporaryBanDuration = ((TimeAction) action).getDuration();
            List<Bson> temporaryBanUpdate = List.of(Operators.set("unbanAt", Operators.add(Operators.nowEpochSecond(), temporaryBanDuration)));
            Bson filter = Filters.and(Filters.eq("userId", target.getIdLong()), Filters.eq("guildId", guild.getIdLong()));
            return bot.getMongo().updateTemporaryBan(filter, temporaryBanUpdate, new UpdateOptions().upsert(true)).thenCompose(temporaryBanResult -> target.ban(1).reason(ModUtility.getAuditReason(reason, moderator.getUser())).submit()).thenApply($ -> {
                bot.getModActionManager().onModAction(new TemporaryBanEvent(moderator, target.getUser(), reason, true, temporaryBanDuration));
                bot.getTemporaryBanManager().putBan(guild.getIdLong(), target.getIdLong(), temporaryBanDuration);
                return action;
            });
        case BAN:
            if (!guild.getSelfMember().hasPermission(Permission.BAN_MEMBERS)) {
                return CompletableFuture.failedFuture(new BotPermissionException(Permission.BAN_MEMBERS));
            }
            if (!guild.getSelfMember().canInteract(target)) {
                return CompletableFuture.failedFuture(new BotHierarchyException("ban"));
            }
            if (!moderator.hasPermission(Permission.BAN_MEMBERS)) {
                return CompletableFuture.failedFuture(new AuthorPermissionException(Permission.BAN_MEMBERS));
            }
            return target.ban(1).reason(ModUtility.getAuditReason(reason, moderator.getUser())).submit().thenApply($ -> {
                bot.getModActionManager().onModAction(new BanEvent(moderator, target.getUser(), reason, true));
                return action;
            });
        default:
            return CompletableFuture.completedFuture(null);
    }
}
Also used : Document(org.bson.Document) Operators(com.sx4.bot.database.mongo.model.Operators) BotPermissionException(com.sx4.bot.exceptions.mod.BotPermissionException) com.sx4.bot.entities.mod.action(com.sx4.bot.entities.mod.action) Permission(net.dv8tion.jda.api.Permission) MongoDatabase(com.sx4.bot.database.mongo.MongoDatabase) CompletableFuture(java.util.concurrent.CompletableFuture) MaxRolesException(com.sx4.bot.exceptions.mod.MaxRolesException) Member(net.dv8tion.jda.api.entities.Member) AuthorPermissionException(com.sx4.bot.exceptions.mod.AuthorPermissionException) BotHierarchyException(com.sx4.bot.exceptions.mod.BotHierarchyException) AtomicReference(java.util.concurrent.atomic.AtomicReference) User(net.dv8tion.jda.api.entities.User) Bson(org.bson.conversions.Bson) List(java.util.List) Guild(net.dv8tion.jda.api.entities.Guild) Sx4(com.sx4.bot.core.Sx4) Role(net.dv8tion.jda.api.entities.Role) Duration(java.time.Duration) Reason(com.sx4.bot.entities.mod.Reason) Clock(java.time.Clock) com.sx4.bot.events.mod(com.sx4.bot.events.mod) com.mongodb.client.model(com.mongodb.client.model) Collections(java.util.Collections) Guild(net.dv8tion.jda.api.entities.Guild) Bson(org.bson.conversions.Bson) BotPermissionException(com.sx4.bot.exceptions.mod.BotPermissionException) BotHierarchyException(com.sx4.bot.exceptions.mod.BotHierarchyException) AuthorPermissionException(com.sx4.bot.exceptions.mod.AuthorPermissionException)

Example 4 with Warn

use of com.sx4.bot.entities.mod.action.Warn in project Sx4 by sx4-discord-bot.

the class ModUtility method warn.

public static CompletableFuture<WarnAction> warn(Sx4 bot, Member target, Member moderator, Reason reason) {
    CompletableFuture<WarnAction> future = new CompletableFuture<>();
    Guild guild = target.getGuild();
    Document data = bot.getMongo().getGuildById(guild.getIdLong(), Projections.include("warn", "mute", "temporaryBan", "fakePermissions"));
    List<Document> fakePermissions = data.getEmbedded(List.of("fakePermissions", "holders"), Collections.emptyList());
    Document warnData = data.get("warn", MongoDatabase.EMPTY_DOCUMENT);
    List<Document> config = warnData.getList("config", Document.class, Warn.DEFAULT_CONFIG);
    boolean punishments = warnData.getBoolean("punishments", true);
    Document reset = warnData.get("reset", Document.class);
    int maxWarning = punishments ? config.stream().map(d -> d.getInteger("number")).max(Integer::compareTo).get() : Integer.MAX_VALUE;
    List<Bson> update = List.of(Operators.set("warnings", Operators.let(new Document("warnings", Operators.ifNull("$warnings", 0)), Operators.mod(Operators.cond(Operators.exists("$reset"), Operators.max(1, Operators.add(1, Operators.subtract("$$warnings", Operators.multiply(Operators.toInt(Operators.floor(Operators.divide(Operators.subtract(Operators.nowEpochSecond(), "$lastWarning"), "$reset.after"))), "$reset.amount")))), Operators.add("$$warnings", 1)), maxWarning))), Operators.set("lastWarning", Operators.nowEpochSecond()), reset == null ? Operators.unset("reset") : Operators.set("reset", reset));
    FindOneAndUpdateOptions options = new FindOneAndUpdateOptions().returnDocument(ReturnDocument.AFTER).projection(Projections.include("warnings")).upsert(true);
    Bson filter = Filters.and(Filters.eq("userId", target.getIdLong()), Filters.eq("guildId", guild.getIdLong()));
    bot.getMongo().findAndUpdateWarnings(filter, update, options).whenComplete((result, exception) -> {
        if (exception != null) {
            future.completeExceptionally(exception);
            return;
        }
        int warnings = result.getInteger("warnings");
        Action warnAction = new Action(ModAction.WARN);
        Action currentAction = warnAction, nextAction = warnAction;
        if (punishments) {
            for (Document configData : config) {
                int number = configData.getInteger("number");
                if (number == warnings) {
                    currentAction = Action.fromData(configData.get("action", Document.class));
                } else if (number == warnings + 1) {
                    nextAction = Action.fromData(configData.get("action", Document.class));
                }
            }
        }
        Action action = currentAction;
        Warn currentWarning = new Warn(action, warnings);
        Warn nextWarning = new Warn(nextAction, warnings + 1);
        switch(action.getModAction()) {
            case WARN:
                bot.getModActionManager().onModAction(new WarnEvent(moderator, target.getUser(), reason, currentWarning, nextWarning));
                future.complete(new WarnAction(currentWarning));
                break;
            case MUTE_EXTEND:
            case MUTE:
                if (!guild.getSelfMember().hasPermission(Permission.MANAGE_ROLES)) {
                    future.completeExceptionally(new BotPermissionException(Permission.MANAGE_ROLES));
                    return;
                }
                AtomicReference<Role> atomicRole = new AtomicReference<>();
                Document mute = data.get("mute", MongoDatabase.EMPTY_DOCUMENT);
                long muteDuration = ((TimeAction) action).getDuration();
                boolean extend = action.getModAction().isExtend();
                ModUtility.upsertMuteRole(bot.getMongo(), guild, mute.get("roleId", 0L), mute.get("autoUpdate", true)).thenCompose(role -> {
                    atomicRole.set(role);
                    List<Bson> muteUpdate = List.of(Operators.set("unmuteAt", Operators.add(muteDuration, Operators.cond(Operators.and(extend, Operators.exists("$unmuteAt")), "$unmuteAt", Operators.nowEpochSecond()))));
                    Bson muteFilter = Filters.and(Filters.eq("userId", target.getIdLong()), Filters.eq("guildId", guild.getIdLong()));
                    return bot.getMongo().updateMute(muteFilter, muteUpdate, new UpdateOptions().upsert(true));
                }).whenComplete((muteResult, muteException) -> {
                    if (muteException != null) {
                        future.completeExceptionally(muteException);
                        return;
                    }
                    Role role = atomicRole.get();
                    guild.addRoleToMember(target, role).reason(ModUtility.getAuditReason(reason, moderator.getUser())).queue($ -> {
                        bot.getMuteManager().putMute(guild.getIdLong(), target.getIdLong(), role.getIdLong(), muteDuration, extend && muteResult.getUpsertedId() == null);
                        bot.getModActionManager().onModAction(new WarnEvent(moderator, target.getUser(), reason, currentWarning, nextWarning));
                        future.complete(new WarnAction(currentWarning));
                    });
                });
                break;
            case KICK:
                if (!guild.getSelfMember().hasPermission(Permission.KICK_MEMBERS)) {
                    future.completeExceptionally(new BotPermissionException(Permission.KICK_MEMBERS));
                    return;
                }
                if (!guild.getSelfMember().canInteract(target)) {
                    future.completeExceptionally(new BotHierarchyException("kick"));
                    return;
                }
                if (!CheckUtility.hasPermissions(bot, moderator, fakePermissions, Permission.KICK_MEMBERS)) {
                    future.completeExceptionally(new AuthorPermissionException(Permission.KICK_MEMBERS));
                    return;
                }
                target.kick(ModUtility.getAuditReason(reason, moderator.getUser())).queue($ -> {
                    bot.getModActionManager().onModAction(new WarnEvent(moderator, target.getUser(), reason, currentWarning, nextWarning));
                    future.complete(new WarnAction(currentWarning));
                });
                break;
            case TEMPORARY_BAN:
                if (!guild.getSelfMember().hasPermission(Permission.BAN_MEMBERS)) {
                    future.completeExceptionally(new BotPermissionException(Permission.BAN_MEMBERS));
                    return;
                }
                if (!guild.getSelfMember().canInteract(target)) {
                    future.completeExceptionally(new BotHierarchyException("ban"));
                    return;
                }
                if (!CheckUtility.hasPermissions(bot, moderator, fakePermissions, Permission.BAN_MEMBERS)) {
                    future.completeExceptionally(new AuthorPermissionException(Permission.BAN_MEMBERS));
                    return;
                }
                long temporaryBanDuration = ((TimeAction) action).getDuration();
                Bson temporaryBanUpdate = Updates.set("unbanAt", Clock.systemUTC().instant().getEpochSecond() + temporaryBanDuration);
                Bson temporaryBanFilter = Filters.and(Filters.eq("userId", target.getIdLong()), Filters.eq("guildId", guild.getIdLong()));
                bot.getMongo().updateTemporaryBan(temporaryBanFilter, temporaryBanUpdate, new UpdateOptions().upsert(true)).whenComplete((temporaryBanResult, temporaryBanException) -> {
                    if (temporaryBanException != null) {
                        future.completeExceptionally(temporaryBanException);
                        return;
                    }
                    target.ban(1).reason(ModUtility.getAuditReason(reason, moderator.getUser())).queue($ -> {
                        bot.getModActionManager().onModAction(new WarnEvent(moderator, target.getUser(), reason, currentWarning, nextWarning));
                        bot.getTemporaryBanManager().putBan(guild.getIdLong(), target.getIdLong(), ((TimeAction) action).getDuration());
                        future.complete(new WarnAction(currentWarning));
                    });
                });
                break;
            case BAN:
                if (!guild.getSelfMember().hasPermission(Permission.BAN_MEMBERS)) {
                    future.completeExceptionally(new BotPermissionException(Permission.BAN_MEMBERS));
                    return;
                }
                if (!guild.getSelfMember().canInteract(target)) {
                    future.completeExceptionally(new BotHierarchyException("ban"));
                    return;
                }
                if (!CheckUtility.hasPermissions(bot, moderator, fakePermissions, Permission.BAN_MEMBERS)) {
                    future.completeExceptionally(new AuthorPermissionException(Permission.BAN_MEMBERS));
                    return;
                }
                target.ban(1).reason(ModUtility.getAuditReason(reason, moderator.getUser())).queue($ -> {
                    bot.getModActionManager().onModAction(new WarnEvent(moderator, target.getUser(), reason, currentWarning, nextWarning));
                    future.complete(new WarnAction(currentWarning));
                });
                break;
            default:
                break;
        }
    });
    return future;
}
Also used : Document(org.bson.Document) Operators(com.sx4.bot.database.mongo.model.Operators) BotPermissionException(com.sx4.bot.exceptions.mod.BotPermissionException) com.sx4.bot.entities.mod.action(com.sx4.bot.entities.mod.action) Permission(net.dv8tion.jda.api.Permission) MongoDatabase(com.sx4.bot.database.mongo.MongoDatabase) CompletableFuture(java.util.concurrent.CompletableFuture) MaxRolesException(com.sx4.bot.exceptions.mod.MaxRolesException) Member(net.dv8tion.jda.api.entities.Member) AuthorPermissionException(com.sx4.bot.exceptions.mod.AuthorPermissionException) BotHierarchyException(com.sx4.bot.exceptions.mod.BotHierarchyException) AtomicReference(java.util.concurrent.atomic.AtomicReference) User(net.dv8tion.jda.api.entities.User) Bson(org.bson.conversions.Bson) List(java.util.List) Guild(net.dv8tion.jda.api.entities.Guild) Sx4(com.sx4.bot.core.Sx4) Role(net.dv8tion.jda.api.entities.Role) Duration(java.time.Duration) Reason(com.sx4.bot.entities.mod.Reason) Clock(java.time.Clock) com.sx4.bot.events.mod(com.sx4.bot.events.mod) com.mongodb.client.model(com.mongodb.client.model) Collections(java.util.Collections) Guild(net.dv8tion.jda.api.entities.Guild) Document(org.bson.Document) Bson(org.bson.conversions.Bson) CompletableFuture(java.util.concurrent.CompletableFuture) BotPermissionException(com.sx4.bot.exceptions.mod.BotPermissionException) List(java.util.List) BotHierarchyException(com.sx4.bot.exceptions.mod.BotHierarchyException) AuthorPermissionException(com.sx4.bot.exceptions.mod.AuthorPermissionException) AtomicReference(java.util.concurrent.atomic.AtomicReference) Role(net.dv8tion.jda.api.entities.Role)

Example 5 with Warn

use of com.sx4.bot.entities.mod.action.Warn in project Sx4 by sx4-discord-bot.

the class WarnCommand method list.

@Command(value = "list", description = "Lists all the warned users in the server and how many warnings they have")
@CommandId(258)
@Examples({ "warn list" })
@BotPermissions(permissions = { Permission.MESSAGE_EMBED_LINKS })
public void list(Sx4CommandEvent event) {
    List<Bson> pipeline = List.of(Aggregates.match(Filters.eq("guildId", event.getGuild().getIdLong())), Aggregates.project(Projections.fields(Projections.include("userId"), Projections.computed("warnings", Operators.cond(Operators.or(Operators.isNull("$reset"), Operators.isNull("$warnings")), Operators.ifNull("$warnings", 0), Operators.max(0, Operators.subtract("$warnings", Operators.multiply(Operators.toInt(Operators.floor(Operators.divide(Operators.subtract(Operators.nowEpochSecond(), "$lastWarning"), "$reset.after"))), "$reset.amount"))))))), Aggregates.match(Filters.ne("warnings", 0)), Aggregates.sort(Sorts.descending("warnings")));
    event.getMongo().aggregateWarnings(pipeline).whenComplete((users, exception) -> {
        if (ExceptionUtility.sendExceptionally(event, exception)) {
            return;
        }
        if (users.isEmpty()) {
            event.replyFailure("There are no users with warnings in this server").queue();
            return;
        }
        PagedResult<Document> paged = new PagedResult<>(event.getBot(), users).setAuthor("Warned Users", null, event.getGuild().getIconUrl()).setIndexed(false).setDisplayFunction(data -> {
            long userId = data.getLong("userId");
            User user = event.getShardManager().getUserById(userId);
            return "`" + (user == null ? "Anonymous#0000 (" + userId + ")" : MarkdownSanitizer.escape(user.getAsTag())) + "` - Warning **#" + data.getInteger("warnings") + "**";
        });
        paged.execute(event);
    });
}
Also used : User(net.dv8tion.jda.api.entities.User) Document(org.bson.Document) Bson(org.bson.conversions.Bson) Command(com.jockie.bot.core.command.Command) Sx4Command(com.sx4.bot.core.Sx4Command)

Aggregations

Document (org.bson.Document)6 Bson (org.bson.conversions.Bson)6 Command (com.jockie.bot.core.command.Command)4 Sx4Command (com.sx4.bot.core.Sx4Command)4 User (net.dv8tion.jda.api.entities.User)4 com.mongodb.client.model (com.mongodb.client.model)3 MongoDatabase (com.sx4.bot.database.mongo.MongoDatabase)3 Operators (com.sx4.bot.database.mongo.model.Operators)3 Reason (com.sx4.bot.entities.mod.Reason)3 Clock (java.time.Clock)3 Duration (java.time.Duration)3 List (java.util.List)3 Permission (net.dv8tion.jda.api.Permission)3 Member (net.dv8tion.jda.api.entities.Member)3 Sx4 (com.sx4.bot.core.Sx4)2 com.sx4.bot.entities.mod.action (com.sx4.bot.entities.mod.action)2 Action (com.sx4.bot.entities.mod.action.Action)2 ModAction (com.sx4.bot.entities.mod.action.ModAction)2 TimeAction (com.sx4.bot.entities.mod.action.TimeAction)2 Warn (com.sx4.bot.entities.mod.action.Warn)2