Search in sources :

Example 76 with AuthorPermissions

use of com.sx4.bot.annotations.command.AuthorPermissions in project Sx4 by sx4-discord-bot.

the class GiveawayCommand method delete.

@Command(value = "delete", aliases = { "remove" }, description = "Deletes a giveaway")
@CommandId(51)
@Examples({ "giveaway delete 727224132202397726", "giveaway delete all" })
@AuthorPermissions(permissions = { Permission.MANAGE_SERVER })
public void delete(Sx4CommandEvent event, @Argument(value = "message id | all") @AlternativeOptions("all") Alternative<MessageArgument> option) {
    if (option.isAlternative()) {
        List<Button> buttons = List.of(Button.success("yes", "Yes"), Button.danger("no", "No"));
        event.reply(event.getAuthor().getName() + ", are you sure you want to delete **all** giveaways in this server?").setActionRow(buttons).submit().thenCompose(message -> {
            return new Waiter<>(event.getBot(), ButtonClickEvent.class).setPredicate(e -> ButtonUtility.handleButtonConfirmation(e, message, event.getAuthor())).setCancelPredicate(e -> ButtonUtility.handleButtonCancellation(e, message, event.getAuthor())).onFailure(e -> ButtonUtility.handleButtonFailure(e, message)).setTimeout(60).start();
        }).whenComplete((e, exception) -> {
            Throwable cause = exception instanceof CompletionException ? exception.getCause() : exception;
            if (cause instanceof CancelException) {
                GenericEvent cancelEvent = ((CancelException) cause).getEvent();
                if (cancelEvent != null) {
                    ((ButtonClickEvent) cancelEvent).reply("Cancelled " + event.getConfig().getSuccessEmote()).queue();
                }
                return;
            } else if (cause instanceof TimeoutException) {
                event.reply("Timed out :stopwatch:").queue();
                return;
            } else if (ExceptionUtility.sendExceptionally(event, exception)) {
                return;
            }
            event.getMongo().deleteManyGiveaways(Filters.eq("guildId", event.getGuild().getIdLong())).whenComplete((result, databaseException) -> {
                if (ExceptionUtility.sendExceptionally(event, databaseException)) {
                    return;
                }
                if (result.getDeletedCount() == 0) {
                    e.reply("There are no giveaways in this server " + event.getConfig().getFailureEmote()).queue();
                    return;
                }
                e.reply("All giveaways in this server have been deleted " + event.getConfig().getSuccessEmote()).queue();
            });
        });
    } else {
        long messageId = option.getValue().getMessageId();
        event.getMongo().deleteGiveawayById(messageId).whenComplete((result, exception) -> {
            if (ExceptionUtility.sendExceptionally(event, exception)) {
                return;
            }
            if (result.getDeletedCount() == 0) {
                event.replyFailure("There was no giveaway with that id").queue();
                return;
            }
            event.replySuccess("That giveaway has been deleted").queue();
        });
    }
}
Also used : Document(org.bson.Document) CancelException(com.sx4.bot.waiter.exception.CancelException) Command(com.jockie.bot.core.command.Command) ButtonClickEvent(net.dv8tion.jda.api.events.interaction.ButtonClickEvent) MessageArgument(com.sx4.bot.entities.argument.MessageArgument) Permission(net.dv8tion.jda.api.Permission) Projections(com.mongodb.client.model.Projections) FindOneAndUpdateOptions(com.mongodb.client.model.FindOneAndUpdateOptions) CommandId(com.sx4.bot.annotations.command.CommandId) CompletableFuture(java.util.concurrent.CompletableFuture) TextChannel(net.dv8tion.jda.api.entities.TextChannel) PagedResult(com.sx4.bot.paged.PagedResult) AtomicReference(java.util.concurrent.atomic.AtomicReference) User(net.dv8tion.jda.api.entities.User) ArrayList(java.util.ArrayList) Filters(com.mongodb.client.model.Filters) Bson(org.bson.conversions.Bson) Alternative(com.sx4.bot.entities.argument.Alternative) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Sx4CommandEvent(com.sx4.bot.core.Sx4CommandEvent) Button(net.dv8tion.jda.api.interactions.components.Button) Duration(java.time.Duration) AlternativeOptions(com.sx4.bot.annotations.argument.AlternativeOptions) com.sx4.bot.utility(com.sx4.bot.utility) Waiter(com.sx4.bot.waiter.Waiter) GenericEvent(net.dv8tion.jda.api.events.GenericEvent) Argument(com.jockie.bot.core.argument.Argument) Limit(com.sx4.bot.annotations.argument.Limit) AuthorPermissions(com.sx4.bot.annotations.command.AuthorPermissions) Operators(com.sx4.bot.database.mongo.model.Operators) ShardManager(net.dv8tion.jda.api.sharding.ShardManager) Sx4Command(com.sx4.bot.core.Sx4Command) ReturnDocument(com.mongodb.client.model.ReturnDocument) CompletionException(java.util.concurrent.CompletionException) TimeoutException(com.sx4.bot.waiter.exception.TimeoutException) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) ModuleCategory(com.sx4.bot.category.ModuleCategory) List(java.util.List) DefaultNumber(com.sx4.bot.annotations.argument.DefaultNumber) Examples(com.sx4.bot.annotations.command.Examples) Clock(java.time.Clock) MessageEmbed(net.dv8tion.jda.api.entities.MessageEmbed) MessageReceivedEvent(net.dv8tion.jda.api.events.message.MessageReceivedEvent) Collections(java.util.Collections) Button(net.dv8tion.jda.api.interactions.components.Button) GenericEvent(net.dv8tion.jda.api.events.GenericEvent) CompletionException(java.util.concurrent.CompletionException) CancelException(com.sx4.bot.waiter.exception.CancelException) Waiter(com.sx4.bot.waiter.Waiter) TimeoutException(com.sx4.bot.waiter.exception.TimeoutException) AuthorPermissions(com.sx4.bot.annotations.command.AuthorPermissions) Command(com.jockie.bot.core.command.Command) Sx4Command(com.sx4.bot.core.Sx4Command) CommandId(com.sx4.bot.annotations.command.CommandId) Examples(com.sx4.bot.annotations.command.Examples)

Example 77 with AuthorPermissions

use of com.sx4.bot.annotations.command.AuthorPermissions in project Sx4 by sx4-discord-bot.

the class GiveawayCommand method setup.

@Command(value = "setup", description = "Setup giveaways for users to react to")
@CommandId(47)
@Examples({ "giveaway setup", "giveaway setup #giveaways 1 7d $10 Nitro" })
@AuthorPermissions(permissions = { Permission.MANAGE_SERVER })
public void setup(Sx4CommandEvent event, @Argument(value = "channel", nullDefault = true) TextChannel channel, @Argument(value = "winners") @DefaultNumber(0) @Limit(min = 1) int winners, @Argument(value = "duration", nullDefault = true) Duration duration, @Argument(value = "item", nullDefault = true, endless = true) String item) {
    if (channel != null && winners != 0 && duration != null && item != null) {
        long seconds = duration.toSeconds();
        if (seconds < 1) {
            event.replyFailure("The duration of a giveaway cannot be less than 1 second").queue();
            return;
        }
        channel.sendMessageEmbeds(this.getEmbed(winners, seconds, item)).queue(message -> {
            message.addReaction("🎉").queue();
            Document data = new Document("messageId", message.getIdLong()).append("channelId", channel.getIdLong()).append("guildId", event.getGuild().getIdLong()).append("winnersAmount", winners).append("endAt", Clock.systemUTC().instant().getEpochSecond() + seconds).append("duration", seconds).append("item", item);
            event.getMongo().insertGiveaway(data).whenComplete((result, exception) -> {
                if (ExceptionUtility.sendExceptionally(event, exception)) {
                    return;
                }
                event.getBot().getGiveawayManager().putGiveaway(data, seconds);
                event.reply("Your giveaway has been created in " + channel.getAsMention() + " :tada:").queue();
            });
        });
        return;
    }
    AtomicReference<TextChannel> atomicChannel = new AtomicReference<>();
    AtomicInteger atomicWinners = new AtomicInteger();
    AtomicReference<Duration> atomicDuration = new AtomicReference<>();
    AtomicReference<String> atomicItem = new AtomicReference<>();
    CompletableFuture.completedFuture(true).thenCompose($ -> {
        if (channel != null) {
            atomicChannel.set(channel);
            return CompletableFuture.completedFuture(true);
        }
        CompletableFuture<Boolean> future = new CompletableFuture<>();
        event.reply("What channel would you like to start the giveaway in? Type `cancel` at anytime to cancel the creation.").queue(message -> {
            Waiter<MessageReceivedEvent> waiter = new Waiter<>(event.getBot(), MessageReceivedEvent.class).setUnique(event.getAuthor().getIdLong(), event.getChannel().getIdLong()).setCancelPredicate(e -> e.getMessage().getContentRaw().equalsIgnoreCase("cancel")).setTimeout(30).setPredicate(e -> {
                TextChannel textChannel = SearchUtility.getTextChannel(event.getGuild(), e.getMessage().getContentRaw());
                if (textChannel != null) {
                    atomicChannel.set(textChannel);
                    return true;
                }
                event.replyFailure("I could not find that channel").queue();
                return false;
            });
            waiter.onCancelled((type) -> {
                event.replySuccess("Cancelled").queue();
                future.complete(false);
            });
            waiter.onTimeout(() -> {
                event.reply("Response timed out :stopwatch:").queue();
                future.complete(false);
            });
            waiter.onSuccess(e -> future.complete(true));
            waiter.start();
        });
        return future;
    }).thenCompose(success -> {
        if (!success) {
            return CompletableFuture.completedFuture(false);
        }
        if (winners != 0) {
            atomicWinners.set(winners);
            return CompletableFuture.completedFuture(true);
        }
        CompletableFuture<Boolean> future = new CompletableFuture<>();
        event.reply("How many winners would you like the giveaway to have?").queue(message -> {
            Waiter<MessageReceivedEvent> waiter = new Waiter<>(event.getBot(), MessageReceivedEvent.class).setCancelPredicate(e -> e.getMessage().getContentRaw().equalsIgnoreCase("cancel")).setTimeout(30).setUnique(event.getAuthor().getIdLong(), event.getChannel().getIdLong()).setPredicate(e -> {
                String content = e.getMessage().getContentRaw();
                if (NumberUtility.isNumberUnsigned(content)) {
                    int number = Integer.parseInt(content);
                    if (number < 1) {
                        event.replyFailure("You have to have at least 1 winner").queue();
                        return false;
                    }
                    atomicWinners.set(number);
                    return true;
                }
                event.replyFailure("That is not a number").queue();
                return false;
            });
            waiter.onCancelled((type) -> {
                event.replySuccess("Cancelled").queue();
                future.complete(false);
            });
            waiter.onTimeout(() -> {
                event.reply("Response timed out :stopwatch:").queue();
                future.complete(false);
            });
            waiter.onSuccess(e -> future.complete(true));
            waiter.start();
        });
        return future;
    }).thenCompose(success -> {
        if (!success) {
            return CompletableFuture.completedFuture(false);
        }
        if (duration != null) {
            atomicDuration.set(duration);
            return CompletableFuture.completedFuture(true);
        }
        CompletableFuture<Boolean> future = new CompletableFuture<>();
        event.reply("How long would you like the giveaway to last?").queue(message -> {
            Waiter<MessageReceivedEvent> waiter = new Waiter<>(event.getBot(), MessageReceivedEvent.class).setCancelPredicate(e -> e.getMessage().getContentRaw().equalsIgnoreCase("cancel")).setTimeout(30).setUnique(event.getAuthor().getIdLong(), event.getChannel().getIdLong()).setPredicate(e -> {
                Duration durationReply = TimeUtility.getDurationFromString(e.getMessage().getContentRaw());
                if (durationReply.toSeconds() < 1) {
                    event.replyFailure("The duration of a giveaway cannot be less than 1 second").queue();
                    return false;
                }
                atomicDuration.set(durationReply);
                return true;
            });
            waiter.onCancelled((type) -> {
                event.replySuccess("Cancelled").queue();
                future.complete(false);
            });
            waiter.onTimeout(() -> {
                event.reply("Response timed out :stopwatch:").queue();
                future.complete(false);
            });
            waiter.onSuccess(e -> future.complete(true));
            waiter.start();
        });
        return future;
    }).thenCompose(success -> {
        if (!success) {
            return CompletableFuture.completedFuture(false);
        }
        if (item != null) {
            atomicItem.set(item);
            return CompletableFuture.completedFuture(true);
        }
        CompletableFuture<Boolean> future = new CompletableFuture<>();
        event.reply("What would you like to giveaway?").queue(message -> {
            Waiter<MessageReceivedEvent> waiter = new Waiter<>(event.getBot(), MessageReceivedEvent.class).setCancelPredicate(e -> e.getMessage().getContentRaw().equalsIgnoreCase("cancel")).setTimeout(30).setUnique(event.getAuthor().getIdLong(), event.getChannel().getIdLong()).setPredicate(e -> {
                String content = e.getMessage().getContentRaw();
                if (content.equalsIgnoreCase("cancel")) {
                    return false;
                }
                atomicItem.set(content);
                return true;
            });
            waiter.onCancelled((type) -> {
                event.replySuccess("Cancelled").queue();
                future.complete(false);
            });
            waiter.onTimeout(() -> {
                event.reply("Response timed out :stopwatch:").queue();
                future.complete(false);
            });
            waiter.onSuccess(e -> future.complete(true));
            waiter.start();
        });
        return future;
    }).thenAccept(success -> {
        if (!success) {
            return;
        }
        TextChannel channelFuture = atomicChannel.get();
        int winnersFuture = atomicWinners.get();
        long durationFuture = atomicDuration.get().toSeconds();
        String itemFuture = atomicItem.get();
        channelFuture.sendMessageEmbeds(this.getEmbed(winnersFuture, durationFuture, itemFuture)).queue(message -> {
            message.addReaction("🎉").queue();
            Document data = new Document("messageId", message.getIdLong()).append("channelId", channelFuture.getIdLong()).append("guildId", event.getGuild().getIdLong()).append("winnersAmount", winnersFuture).append("endAt", Clock.systemUTC().instant().getEpochSecond() + durationFuture).append("duration", durationFuture).append("item", itemFuture);
            event.getMongo().insertGiveaway(data).whenComplete((result, exception) -> {
                if (ExceptionUtility.sendExceptionally(event, exception)) {
                    return;
                }
                event.getBot().getGiveawayManager().putGiveaway(data, durationFuture);
                event.reply("Your giveaway has been created in " + channelFuture.getAsMention() + " :tada:").queue();
            });
        });
    });
}
Also used : Document(org.bson.Document) CancelException(com.sx4.bot.waiter.exception.CancelException) Command(com.jockie.bot.core.command.Command) ButtonClickEvent(net.dv8tion.jda.api.events.interaction.ButtonClickEvent) MessageArgument(com.sx4.bot.entities.argument.MessageArgument) Permission(net.dv8tion.jda.api.Permission) Projections(com.mongodb.client.model.Projections) FindOneAndUpdateOptions(com.mongodb.client.model.FindOneAndUpdateOptions) CommandId(com.sx4.bot.annotations.command.CommandId) CompletableFuture(java.util.concurrent.CompletableFuture) TextChannel(net.dv8tion.jda.api.entities.TextChannel) PagedResult(com.sx4.bot.paged.PagedResult) AtomicReference(java.util.concurrent.atomic.AtomicReference) User(net.dv8tion.jda.api.entities.User) ArrayList(java.util.ArrayList) Filters(com.mongodb.client.model.Filters) Bson(org.bson.conversions.Bson) Alternative(com.sx4.bot.entities.argument.Alternative) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Sx4CommandEvent(com.sx4.bot.core.Sx4CommandEvent) Button(net.dv8tion.jda.api.interactions.components.Button) Duration(java.time.Duration) AlternativeOptions(com.sx4.bot.annotations.argument.AlternativeOptions) com.sx4.bot.utility(com.sx4.bot.utility) Waiter(com.sx4.bot.waiter.Waiter) GenericEvent(net.dv8tion.jda.api.events.GenericEvent) Argument(com.jockie.bot.core.argument.Argument) Limit(com.sx4.bot.annotations.argument.Limit) AuthorPermissions(com.sx4.bot.annotations.command.AuthorPermissions) Operators(com.sx4.bot.database.mongo.model.Operators) ShardManager(net.dv8tion.jda.api.sharding.ShardManager) Sx4Command(com.sx4.bot.core.Sx4Command) ReturnDocument(com.mongodb.client.model.ReturnDocument) CompletionException(java.util.concurrent.CompletionException) TimeoutException(com.sx4.bot.waiter.exception.TimeoutException) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) ModuleCategory(com.sx4.bot.category.ModuleCategory) List(java.util.List) DefaultNumber(com.sx4.bot.annotations.argument.DefaultNumber) Examples(com.sx4.bot.annotations.command.Examples) Clock(java.time.Clock) MessageEmbed(net.dv8tion.jda.api.entities.MessageEmbed) MessageReceivedEvent(net.dv8tion.jda.api.events.message.MessageReceivedEvent) Collections(java.util.Collections) AtomicReference(java.util.concurrent.atomic.AtomicReference) Duration(java.time.Duration) Document(org.bson.Document) ReturnDocument(com.mongodb.client.model.ReturnDocument) MessageReceivedEvent(net.dv8tion.jda.api.events.message.MessageReceivedEvent) TextChannel(net.dv8tion.jda.api.entities.TextChannel) CompletableFuture(java.util.concurrent.CompletableFuture) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Waiter(com.sx4.bot.waiter.Waiter) AuthorPermissions(com.sx4.bot.annotations.command.AuthorPermissions) Command(com.jockie.bot.core.command.Command) Sx4Command(com.sx4.bot.core.Sx4Command) CommandId(com.sx4.bot.annotations.command.CommandId) Examples(com.sx4.bot.annotations.command.Examples)

Example 78 with AuthorPermissions

use of com.sx4.bot.annotations.command.AuthorPermissions in project Sx4 by sx4-discord-bot.

the class LeaverCommand method channel.

@Command(value = "channel", description = "Sets the channel where leaver messages are sent to")
@CommandId(190)
@Examples({ "leaver channel", "leaver channel #leaves", "leaver channel reset" })
@AuthorPermissions(permissions = { Permission.MANAGE_SERVER })
public void channel(Sx4CommandEvent event, @Argument(value = "channel | reset", endless = true, nullDefault = true) @AlternativeOptions("reset") Alternative<TextChannel> option) {
    TextChannel channel = option == null ? event.getTextChannel() : option.isAlternative() ? null : option.getValue();
    List<Bson> update = List.of(Operators.set("leaver.channelId", channel == null ? Operators.REMOVE : channel.getIdLong()), Operators.unset("leaver.webhook.id"), Operators.unset("leaver.webhook.token"));
    FindOneAndUpdateOptions options = new FindOneAndUpdateOptions().upsert(true).projection(Projections.include("leaver.webhook.token", "leaver.webhook.id", "leaver.channelId")).returnDocument(ReturnDocument.BEFORE);
    event.getMongo().findAndUpdateGuildById(event.getGuild().getIdLong(), update, options).whenComplete((data, exception) -> {
        if (ExceptionUtility.sendExceptionally(event, exception)) {
            return;
        }
        long channelId = data == null ? 0L : data.getEmbedded(List.of("leaver", "channelId"), 0L);
        event.getBot().getLeaverManager().removeWebhook(channelId);
        if ((channel == null ? 0L : channel.getIdLong()) == channelId) {
            event.replyFailure("The leaver channel is already " + (channel == null ? "unset" : "set to " + channel.getAsMention())).queue();
            return;
        }
        TextChannel oldChannel = channelId == 0L ? null : event.getGuild().getTextChannelById(channelId);
        long webhookId = data == null ? 0L : data.getEmbedded(List.of("leaver", "webhook", "id"), 0L);
        if (oldChannel != null && webhookId != 0L) {
            oldChannel.deleteWebhookById(Long.toString(webhookId)).queue(null, ErrorResponseException.ignore(ErrorResponse.UNKNOWN_WEBHOOK));
        }
        event.replySuccess("The leaver channel has been " + (channel == null ? "unset" : "set to " + channel.getAsMention())).queue();
    });
}
Also used : TextChannel(net.dv8tion.jda.api.entities.TextChannel) FindOneAndUpdateOptions(com.mongodb.client.model.FindOneAndUpdateOptions) Bson(org.bson.conversions.Bson) Command(com.jockie.bot.core.command.Command) Sx4Command(com.sx4.bot.core.Sx4Command)

Example 79 with AuthorPermissions

use of com.sx4.bot.annotations.command.AuthorPermissions in project Sx4 by sx4-discord-bot.

the class LoggerCommand method avatar.

@Command(value = "avatar", description = "Set the avatar of the webhook that sends logs")
@CommandId(424)
@Examples({ "logger avatar #logs Shea#6653", "logger avatar https://i.imgur.com/i87lyNO.png" })
@Premium
@AuthorPermissions(permissions = { Permission.MANAGE_SERVER })
public void avatar(Sx4CommandEvent event, @Argument(value = "channel", nullDefault = true) TextChannel channel, @Argument(value = "avatar", endless = true, acceptEmpty = true) @ImageUrl String url) {
    TextChannel effectiveChannel = channel == null ? event.getTextChannel() : channel;
    event.getMongo().updateLogger(Filters.eq("channelId", effectiveChannel.getIdLong()), Updates.set("webhook.avatar", url)).whenComplete((result, exception) -> {
        if (ExceptionUtility.sendExceptionally(event, exception)) {
            return;
        }
        if (result.getModifiedCount() == 0) {
            event.replyFailure("Your webhook avatar for that logger was already set to that").queue();
            return;
        }
        event.replySuccess("Your webhook avatar has been updated for that logger, this only works with premium <https://patreon.com/Sx4>").queue();
    });
}
Also used : TextChannel(net.dv8tion.jda.api.entities.TextChannel) Command(com.jockie.bot.core.command.Command) Sx4Command(com.sx4.bot.core.Sx4Command)

Example 80 with AuthorPermissions

use of com.sx4.bot.annotations.command.AuthorPermissions in project Sx4 by sx4-discord-bot.

the class LoggerCommand method name.

@Command(value = "name", description = "Set the name of the webhook that sends logs")
@CommandId(423)
@Examples({ "logger name #logs Logs", "logger name Logger" })
@Premium
@AuthorPermissions(permissions = { Permission.MANAGE_SERVER })
public void name(Sx4CommandEvent event, @Argument(value = "channel", nullDefault = true) TextChannel channel, @Argument(value = "name", endless = true) String name) {
    TextChannel effectiveChannel = channel == null ? event.getTextChannel() : channel;
    event.getMongo().updateLogger(Filters.eq("channelId", effectiveChannel.getIdLong()), Updates.set("webhook.name", name)).whenComplete((result, exception) -> {
        if (ExceptionUtility.sendExceptionally(event, exception)) {
            return;
        }
        if (result.getModifiedCount() == 0) {
            event.replyFailure("Your webhook name for that logger was already set to that").queue();
            return;
        }
        event.replySuccess("Your webhook name has been updated for that logger, this only works with premium <https://patreon.com/Sx4>").queue();
    });
}
Also used : TextChannel(net.dv8tion.jda.api.entities.TextChannel) Command(com.jockie.bot.core.command.Command) Sx4Command(com.sx4.bot.core.Sx4Command)

Aggregations

Command (com.jockie.bot.core.command.Command)88 Sx4Command (com.sx4.bot.core.Sx4Command)88 Bson (org.bson.conversions.Bson)52 AuthorPermissions (com.sx4.bot.annotations.command.AuthorPermissions)48 CommandId (com.sx4.bot.annotations.command.CommandId)48 Examples (com.sx4.bot.annotations.command.Examples)48 Document (org.bson.Document)48 Argument (com.jockie.bot.core.argument.Argument)26 ModuleCategory (com.sx4.bot.category.ModuleCategory)26 Sx4CommandEvent (com.sx4.bot.core.Sx4CommandEvent)26 Permission (net.dv8tion.jda.api.Permission)26 TextChannel (net.dv8tion.jda.api.entities.TextChannel)26 PagedResult (com.sx4.bot.paged.PagedResult)24 BaseGuildMessageChannel (net.dv8tion.jda.api.entities.BaseGuildMessageChannel)24 Operators (com.sx4.bot.database.mongo.model.Operators)23 ExceptionUtility (com.sx4.bot.utility.ExceptionUtility)22 CompletionException (java.util.concurrent.CompletionException)22 MessageChannel (net.dv8tion.jda.api.entities.MessageChannel)20 MongoWriteException (com.mongodb.MongoWriteException)19 com.mongodb.client.model (com.mongodb.client.model)19