Search in sources :

Example 1 with UNKNOWN_MESSAGE

use of net.dv8tion.jda.api.requests.ErrorResponse.UNKNOWN_MESSAGE in project SkyBot by duncte123.

the class PurgeUserCommand method execute.

@Override
public void execute(@Nonnull CommandContext ctx) {
    final List<Member> mentionedMembers = ctx.getMentionedArg(0);
    if (mentionedMembers.isEmpty()) {
        sendMsg(ctx, "I could not find any members with that name");
        return;
    }
    final Member targetMember = mentionedMembers.get(0);
    final User targetUser = targetMember.getUser();
    final TextChannel channel = ctx.getChannel();
    final Message message = ctx.getMessage();
    channel.getIterableHistory().takeAsync(DEL_COUNT).thenApplyAsync((msgs) -> msgs.stream().filter((msg) -> msg.getAuthor().equals(targetUser)).collect(Collectors.toList())).thenApplyAsync((msgs) -> {
        final List<CompletableFuture<Void>> futures = channel.purgeMessages(msgs);
        sendSuccess(message);
        try {
            CompletableFuture.allOf(futures.toArray(new CompletableFuture[0])).get();
        } catch (InterruptedException | ExecutionException e) {
            Sentry.captureException(e);
            return 0;
        }
        return msgs.size();
    }).exceptionally((thr) -> {
        String cause = "";
        if (thr.getCause() != null) {
            cause = " caused by: " + thr.getCause().getMessage();
        }
        sendMsg(ctx, "ERROR: " + thr.getMessage() + cause);
        sendError(message);
        return 0;
    }).whenCompleteAsync((count, thr) -> {
        sendMsg(DELETE_MESSAGE_AFTER_SECONDS.apply(5L).setChannel(ctx.getChannel()).setMessageFormat("Removed %d messages! (this message will auto delete in 5 seconds)", count).build());
        channel.deleteMessageById(message.getIdLong()).queue(null, ignore(UNKNOWN_MESSAGE));
        modLog(String.format("%d messages by %#s removed in %s by %#s", count, targetUser, channel, ctx.getAuthor()), ctx.getGuild());
    });
}
Also used : Message(net.dv8tion.jda.api.entities.Message) CommandContext(ml.duncte123.skybot.objects.command.CommandContext) Permission(net.dv8tion.jda.api.Permission) ModerationUtils.modLog(ml.duncte123.skybot.utils.ModerationUtils.modLog) UNKNOWN_MESSAGE(net.dv8tion.jda.api.requests.ErrorResponse.UNKNOWN_MESSAGE) CompletableFuture(java.util.concurrent.CompletableFuture) Member(net.dv8tion.jda.api.entities.Member) TextChannel(net.dv8tion.jda.api.entities.TextChannel) Collectors(java.util.stream.Collectors) User(net.dv8tion.jda.api.entities.User) ExecutionException(java.util.concurrent.ExecutionException) List(java.util.List) ErrorResponseException.ignore(net.dv8tion.jda.api.exceptions.ErrorResponseException.ignore) MessageUtils(me.duncte123.botcommons.messaging.MessageUtils) Sentry(io.sentry.Sentry) Nonnull(javax.annotation.Nonnull) DELETE_MESSAGE_AFTER_SECONDS(me.duncte123.botcommons.messaging.MessageConfigDefaults.DELETE_MESSAGE_AFTER_SECONDS) TextChannel(net.dv8tion.jda.api.entities.TextChannel) CompletableFuture(java.util.concurrent.CompletableFuture) User(net.dv8tion.jda.api.entities.User) Message(net.dv8tion.jda.api.entities.Message) ExecutionException(java.util.concurrent.ExecutionException) Member(net.dv8tion.jda.api.entities.Member)

Example 2 with UNKNOWN_MESSAGE

use of net.dv8tion.jda.api.requests.ErrorResponse.UNKNOWN_MESSAGE in project SkyBot by duncte123.

the class MessageListener method checkMessageForInvites.

// / <editor-fold desc="auto moderation" defaultstate="collapsed">
private void checkMessageForInvites(Guild guild, GuildMessageReceivedEvent event, GuildSetting settings, String raw) {
    if (settings.isFilterInvites() && guild.getSelfMember().hasPermission(Permission.MANAGE_SERVER)) {
        final Matcher matcher = Message.INVITE_PATTERN.matcher(raw);
        if (matcher.find()) {
            // Get the invite Id from the message
            final String inviteID = matcher.group(matcher.groupCount());
            // Prohibiting failure because the bot is currently banned from the other guild.
            guild.retrieveInvites().queue((invites) -> {
                // Check if the invite is for this guild, if it is not delete the message
                if (invites.stream().noneMatch((invite) -> invite.getCode().equals(inviteID))) {
                    event.getMessage().delete().reason("Contained unauthorized invite.").queue((it) -> sendMsg(MessageConfig.Builder.fromEvent(event).setMessage(event.getAuthor().getAsMention() + ", please don't post invite links here.").setSuccessAction(m -> m.delete().queueAfter(4, TimeUnit.SECONDS)).build()), new ErrorHandler().ignore(UNKNOWN_MESSAGE, MISSING_PERMISSIONS));
                }
            });
        }
    }
}
Also used : MessageData(ml.duncte123.skybot.objects.discord.MessageData) MessageBulkDeleteEvent(net.dv8tion.jda.api.events.message.MessageBulkDeleteEvent) EmbedUtils(me.duncte123.botcommons.messaging.EmbedUtils) StringUtils(me.duncte123.botcommons.StringUtils) Permission(net.dv8tion.jda.api.Permission) CommandCategory(ml.duncte123.skybot.objects.command.CommandCategory) PerspectiveApi(ml.duncte123.skybot.utils.PerspectiveApi) UNKNOWN_MESSAGE(net.dv8tion.jda.api.requests.ErrorResponse.UNKNOWN_MESSAGE) SpamFilter(ml.duncte123.skybot.utils.SpamFilter) Matcher(java.util.regex.Matcher) GuildSettingsUtils(ml.duncte123.skybot.utils.GuildSettingsUtils) GuildMessageReceivedEvent(net.dv8tion.jda.api.events.message.guild.GuildMessageReceivedEvent) GuildSetting(com.dunctebot.models.settings.GuildSetting) GuildMessageUpdateEvent(net.dv8tion.jda.api.events.message.guild.GuildMessageUpdateEvent) Variables(ml.duncte123.skybot.Variables) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) Executors(java.util.concurrent.Executors) UnknownUser(ml.duncte123.skybot.objects.user.UnknownUser) Pattern(java.util.regex.Pattern) MISSING_PERMISSIONS(net.dv8tion.jda.api.requests.ErrorResponse.MISSING_PERMISSIONS) ICommand(ml.duncte123.skybot.objects.command.ICommand) net.dv8tion.jda.api.entities(net.dv8tion.jda.api.entities) BotCommons(me.duncte123.botcommons.BotCommons) java.util(java.util) JDA(net.dv8tion.jda.api.JDA) MarkdownSanitizer(net.dv8tion.jda.api.utils.MarkdownSanitizer) CustomCommand(ml.duncte123.skybot.objects.command.custom.CustomCommand) GuildMessageDeleteEvent(net.dv8tion.jda.api.events.message.guild.GuildMessageDeleteEvent) MessageUtils(me.duncte123.botcommons.messaging.MessageUtils) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) Sentry(io.sentry.Sentry) Nonnull(javax.annotation.Nonnull) Nullable(javax.annotation.Nullable) ErrorHandler(net.dv8tion.jda.api.exceptions.ErrorHandler) GenericGuildMessageEvent(net.dv8tion.jda.api.events.message.guild.GenericGuildMessageEvent) CommandUtils.isGuildPatron(ml.duncte123.skybot.utils.CommandUtils.isGuildPatron) ShardManager(net.dv8tion.jda.api.sharding.ShardManager) MessageUtils.sendMsg(me.duncte123.botcommons.messaging.MessageUtils.sendMsg) CommandContext(ml.duncte123.skybot.objects.command.CommandContext) CommandUtils.isDev(ml.duncte123.skybot.utils.CommandUtils.isDev) ModerationUtils.modLog(ml.duncte123.skybot.utils.ModerationUtils.modLog) CommandManager(ml.duncte123.skybot.CommandManager) DunctebotGuild(ml.duncte123.skybot.entities.jda.DunctebotGuild) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) AirUtils.setJDAContext(ml.duncte123.skybot.utils.AirUtils.setJDAContext) Triple(kotlin.Triple) Settings(ml.duncte123.skybot.Settings) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) MessageConfig(me.duncte123.botcommons.messaging.MessageConfig) RedisConnection(ml.duncte123.skybot.database.RedisConnection) DateTimeFormatter(java.time.format.DateTimeFormatter) ErrorHandler(net.dv8tion.jda.api.exceptions.ErrorHandler) Matcher(java.util.regex.Matcher)

Example 3 with UNKNOWN_MESSAGE

use of net.dv8tion.jda.api.requests.ErrorResponse.UNKNOWN_MESSAGE in project SkyBot by DuncteBot.

the class PurgeUserCommand method execute.

@Override
public void execute(@Nonnull CommandContext ctx) {
    final List<Member> mentionedMembers = ctx.getMentionedArg(0);
    if (mentionedMembers.isEmpty()) {
        sendMsg(ctx, "I could not find any members with that name");
        return;
    }
    final Member targetMember = mentionedMembers.get(0);
    final User targetUser = targetMember.getUser();
    final TextChannel channel = ctx.getChannel();
    final Message message = ctx.getMessage();
    channel.getIterableHistory().takeAsync(DEL_COUNT).thenApplyAsync((msgs) -> msgs.stream().filter((msg) -> msg.getAuthor().equals(targetUser)).collect(Collectors.toList())).thenApplyAsync((msgs) -> {
        final List<CompletableFuture<Void>> futures = channel.purgeMessages(msgs);
        sendSuccess(message);
        try {
            CompletableFuture.allOf(futures.toArray(new CompletableFuture[0])).get();
        } catch (InterruptedException | ExecutionException e) {
            Sentry.captureException(e);
            return 0;
        }
        return msgs.size();
    }).exceptionally((thr) -> {
        String cause = "";
        if (thr.getCause() != null) {
            cause = " caused by: " + thr.getCause().getMessage();
        }
        sendMsg(ctx, "ERROR: " + thr.getMessage() + cause);
        sendError(message);
        return 0;
    }).whenCompleteAsync((count, thr) -> {
        sendMsg(DELETE_MESSAGE_AFTER_SECONDS.apply(5L).setChannel(ctx.getChannel()).setMessageFormat("Removed %d messages! (this message will auto delete in 5 seconds)", count).build());
        channel.deleteMessageById(message.getIdLong()).queue(null, ignore(UNKNOWN_MESSAGE));
        modLog(String.format("%d messages by %#s removed in %s by %#s", count, targetUser, channel, ctx.getAuthor()), ctx.getGuild());
    });
}
Also used : Message(net.dv8tion.jda.api.entities.Message) CommandContext(ml.duncte123.skybot.objects.command.CommandContext) Permission(net.dv8tion.jda.api.Permission) ModerationUtils.modLog(ml.duncte123.skybot.utils.ModerationUtils.modLog) UNKNOWN_MESSAGE(net.dv8tion.jda.api.requests.ErrorResponse.UNKNOWN_MESSAGE) CompletableFuture(java.util.concurrent.CompletableFuture) Member(net.dv8tion.jda.api.entities.Member) TextChannel(net.dv8tion.jda.api.entities.TextChannel) Collectors(java.util.stream.Collectors) User(net.dv8tion.jda.api.entities.User) ExecutionException(java.util.concurrent.ExecutionException) List(java.util.List) ErrorResponseException.ignore(net.dv8tion.jda.api.exceptions.ErrorResponseException.ignore) MessageUtils(me.duncte123.botcommons.messaging.MessageUtils) Sentry(io.sentry.Sentry) Nonnull(javax.annotation.Nonnull) DELETE_MESSAGE_AFTER_SECONDS(me.duncte123.botcommons.messaging.MessageConfigDefaults.DELETE_MESSAGE_AFTER_SECONDS) TextChannel(net.dv8tion.jda.api.entities.TextChannel) CompletableFuture(java.util.concurrent.CompletableFuture) User(net.dv8tion.jda.api.entities.User) Message(net.dv8tion.jda.api.entities.Message) ExecutionException(java.util.concurrent.ExecutionException) Member(net.dv8tion.jda.api.entities.Member)

Example 4 with UNKNOWN_MESSAGE

use of net.dv8tion.jda.api.requests.ErrorResponse.UNKNOWN_MESSAGE in project SkyBot by DuncteBot.

the class MessageListener method checkMessageForInvites.

// / <editor-fold desc="auto moderation" defaultstate="collapsed">
private void checkMessageForInvites(Guild guild, GuildMessageReceivedEvent event, GuildSetting settings, String raw) {
    if (settings.isFilterInvites() && guild.getSelfMember().hasPermission(Permission.MANAGE_SERVER)) {
        final Matcher matcher = Message.INVITE_PATTERN.matcher(raw);
        if (matcher.find()) {
            // Get the invite Id from the message
            final String inviteID = matcher.group(matcher.groupCount());
            // Prohibiting failure because the bot is currently banned from the other guild.
            guild.retrieveInvites().queue((invites) -> {
                // Check if the invite is for this guild, if it is not delete the message
                if (invites.stream().noneMatch((invite) -> invite.getCode().equals(inviteID))) {
                    event.getMessage().delete().reason("Contained unauthorized invite.").queue((it) -> sendMsg(MessageConfig.Builder.fromEvent(event).setMessage(event.getAuthor().getAsMention() + ", please don't post invite links here.").setSuccessAction(m -> m.delete().queueAfter(4, TimeUnit.SECONDS)).build()), new ErrorHandler().ignore(UNKNOWN_MESSAGE, MISSING_PERMISSIONS));
                }
            });
        }
    }
}
Also used : MessageData(ml.duncte123.skybot.objects.discord.MessageData) MessageBulkDeleteEvent(net.dv8tion.jda.api.events.message.MessageBulkDeleteEvent) EmbedUtils(me.duncte123.botcommons.messaging.EmbedUtils) StringUtils(me.duncte123.botcommons.StringUtils) Permission(net.dv8tion.jda.api.Permission) CommandCategory(ml.duncte123.skybot.objects.command.CommandCategory) PerspectiveApi(ml.duncte123.skybot.utils.PerspectiveApi) UNKNOWN_MESSAGE(net.dv8tion.jda.api.requests.ErrorResponse.UNKNOWN_MESSAGE) SpamFilter(ml.duncte123.skybot.utils.SpamFilter) Matcher(java.util.regex.Matcher) GuildSettingsUtils(ml.duncte123.skybot.utils.GuildSettingsUtils) GuildMessageReceivedEvent(net.dv8tion.jda.api.events.message.guild.GuildMessageReceivedEvent) GuildSetting(com.dunctebot.models.settings.GuildSetting) GuildMessageUpdateEvent(net.dv8tion.jda.api.events.message.guild.GuildMessageUpdateEvent) Variables(ml.duncte123.skybot.Variables) Instant(java.time.Instant) Collectors(java.util.stream.Collectors) Executors(java.util.concurrent.Executors) UnknownUser(ml.duncte123.skybot.objects.user.UnknownUser) Pattern(java.util.regex.Pattern) MISSING_PERMISSIONS(net.dv8tion.jda.api.requests.ErrorResponse.MISSING_PERMISSIONS) ICommand(ml.duncte123.skybot.objects.command.ICommand) net.dv8tion.jda.api.entities(net.dv8tion.jda.api.entities) BotCommons(me.duncte123.botcommons.BotCommons) java.util(java.util) JDA(net.dv8tion.jda.api.JDA) MarkdownSanitizer(net.dv8tion.jda.api.utils.MarkdownSanitizer) CustomCommand(ml.duncte123.skybot.objects.command.custom.CustomCommand) GuildMessageDeleteEvent(net.dv8tion.jda.api.events.message.guild.GuildMessageDeleteEvent) MessageUtils(me.duncte123.botcommons.messaging.MessageUtils) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) Sentry(io.sentry.Sentry) Nonnull(javax.annotation.Nonnull) Nullable(javax.annotation.Nullable) ErrorHandler(net.dv8tion.jda.api.exceptions.ErrorHandler) GenericGuildMessageEvent(net.dv8tion.jda.api.events.message.guild.GenericGuildMessageEvent) CommandUtils.isGuildPatron(ml.duncte123.skybot.utils.CommandUtils.isGuildPatron) ShardManager(net.dv8tion.jda.api.sharding.ShardManager) MessageUtils.sendMsg(me.duncte123.botcommons.messaging.MessageUtils.sendMsg) CommandContext(ml.duncte123.skybot.objects.command.CommandContext) CommandUtils.isDev(ml.duncte123.skybot.utils.CommandUtils.isDev) ModerationUtils.modLog(ml.duncte123.skybot.utils.ModerationUtils.modLog) CommandManager(ml.duncte123.skybot.CommandManager) DunctebotGuild(ml.duncte123.skybot.entities.jda.DunctebotGuild) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) AirUtils.setJDAContext(ml.duncte123.skybot.utils.AirUtils.setJDAContext) Triple(kotlin.Triple) Settings(ml.duncte123.skybot.Settings) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) MessageConfig(me.duncte123.botcommons.messaging.MessageConfig) RedisConnection(ml.duncte123.skybot.database.RedisConnection) DateTimeFormatter(java.time.format.DateTimeFormatter) ErrorHandler(net.dv8tion.jda.api.exceptions.ErrorHandler) Matcher(java.util.regex.Matcher)

Example 5 with UNKNOWN_MESSAGE

use of net.dv8tion.jda.api.requests.ErrorResponse.UNKNOWN_MESSAGE in project Levelbot by Kaktushose.

the class ShopListener method onGuildMessageReactionAdd.

@Override
public void onGuildMessageReactionAdd(@NotNull GuildMessageReactionAddEvent event) {
    // bots should just be ignored
    if (event.getUser().isBot()) {
        return;
    }
    // must be in channel #levelsystem
    if (event.getChannel().getIdLong() != LEVEL_SYSTEM_CHANNEL_ID) {
        return;
    }
    if (levelbot.getUserService().getMutedUsers().contains(event.getUser().getIdLong())) {
        event.getReaction().removeReaction(event.getUser()).queue(null, new ErrorHandler().ignore(UNKNOWN_MESSAGE));
        return;
    }
    // indicates active purchase
    if (activeUsers.contains(event.getUser().getIdLong())) {
        event.getReaction().removeReaction(event.getUser()).queue(null, new ErrorHandler().ignore(UNKNOWN_MESSAGE));
        return;
    }
    Member member = event.getMember();
    ItemCategory itemCategory;
    switch(event.getMessageId()) {
        case PREMIUM_MESSAGE_ID:
            itemCategory = ItemCategory.PREMIUM;
            break;
        case DJ_MESSAGE_ID:
            itemCategory = ItemCategory.DJ;
            break;
        case NICKNAME_MESSAGE_ID:
            itemCategory = ItemCategory.NICKNAME;
            break;
        case COINS_BOOSTER_MESSAGE_ID:
            itemCategory = ItemCategory.COINS_BOOSTER;
            break;
        case XP_BOOSTER_MESSAGE_ID:
            itemCategory = ItemCategory.XP_BOOSTER;
            break;
        default:
            event.getReaction().removeReaction(member.getUser()).queue(null, new ErrorHandler().ignore(UNKNOWN_MESSAGE));
            return;
    }
    int variant;
    switch(event.getReactionEmote().getName()) {
        case NumberEmojis.ONE:
            variant = 0;
            break;
        case NumberEmojis.TWO:
            variant = 1;
            break;
        case NumberEmojis.THREE:
            variant = 2;
            break;
        default:
            event.getReaction().removeReaction(member.getUser()).queue();
            return;
    }
    if ((itemCategory == ItemCategory.COINS_BOOSTER || itemCategory == ItemCategory.XP_BOOSTER) && variant == 2) {
        event.getReaction().removeReaction(member.getUser()).queue();
        return;
    }
    Item item = levelService.getItemsByCategoryId(itemCategory.id).get(variant);
    BotUser botUser = userService.getUserById(member.getIdLong());
    String fail = null;
    if (shopService.hasItemOfCategory(member.getIdLong(), item.getCategoryId())) {
        fail = "Du besitzt dieses Item bereits!";
    }
    if (botUser.getCoins() < item.getPrice()) {
        fail = "Du hast nicht genug Münzen!";
    }
    TextChannel channel = event.getChannel();
    Consumer<Message> delete = success -> success.delete().queueAfter(30, TimeUnit.SECONDS, null, new ErrorHandler().ignore(UNKNOWN_MESSAGE));
    MessageBuilder builder = new MessageBuilder().append(member.getAsMention());
    if (fail != null) {
        // transaction failed
        channel.sendMessage(builder.setEmbeds(embedCache.getEmbed("shopError").injectValue("message", fail).toMessageEmbed()).build()).queue(delete);
    } else {
        activeUsers.add(member.getIdLong());
        // confirm transaction
        channel.sendMessage(builder.setEmbeds(embedCache.getEmbed("shopConfirm").injectValue("item", item.getName()).injectValue("price", item.getPrice()).toMessageEmbed()).build()).queue(confirmMessage -> {
            // wait for reactions
            // delete confirm message after 30 secs if nothing happens
            confirmMessage.delete().queueAfter(30, TimeUnit.SECONDS, success -> activeUsers.remove(member.getIdLong()), new ErrorHandler().ignore(UNKNOWN_MESSAGE));
            confirmMessage.addReaction(CONFIRM).and(confirmMessage.addReaction(CANCEL)).queue();
            ReactionWaiter waiter = new ReactionWaiter(confirmMessage, event.getMember(), CONFIRM, CANCEL);
            waiter.onEvent(reactionEvent -> {
                // on reaction confirm or cancel emoji
                confirmMessage.delete().queue();
                if (reactionEvent.getEmote().equals(CONFIRM)) {
                    shopService.buyItem(botUser.getUserId(), item.getItemId());
                    // successful transaction
                    channel.sendMessageEmbeds(embedCache.getEmbed("shopSuccess").injectValue("item", item.getName()).injectValue("days", TimeUnit.MILLISECONDS.toDays(item.getDuration())).toMessageEmbed()).queue(delete);
                    levelbot.getLogChannel().sendMessageEmbeds(embedCache.getEmbed("buyLog").injectValue("user", member.getAsMention()).injectValue("item", item.getName()).toMessageEmbed()).queue();
                }
                activeUsers.remove(member.getIdLong());
                waiter.stopWaiting(false);
            });
        });
    }
    event.getReaction().removeReaction(member.getUser()).queue();
}
Also used : Message(net.dv8tion.jda.api.entities.Message) BotUser(de.kaktushose.levelbot.database.model.BotUser) LevelService(de.kaktushose.levelbot.database.services.LevelService) ListenerAdapter(net.dv8tion.jda.api.hooks.ListenerAdapter) Set(java.util.Set) UNKNOWN_MESSAGE(net.dv8tion.jda.api.requests.ErrorResponse.UNKNOWN_MESSAGE) Levelbot(de.kaktushose.levelbot.bot.Levelbot) Member(net.dv8tion.jda.api.entities.Member) TextChannel(net.dv8tion.jda.api.entities.TextChannel) UserService(de.kaktushose.levelbot.database.services.UserService) HashSet(java.util.HashSet) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) ShopService(de.kaktushose.levelbot.shop.data.ShopService) EmbedCache(com.github.kaktushose.jda.commands.embeds.EmbedCache) MessageBuilder(net.dv8tion.jda.api.MessageBuilder) ReactionWaiter(de.kaktushose.discord.reactionwaiter.ReactionWaiter) GuildMessageReactionAddEvent(net.dv8tion.jda.api.events.message.guild.react.GuildMessageReactionAddEvent) Item(de.kaktushose.levelbot.shop.data.items.Item) NotNull(org.jetbrains.annotations.NotNull) NumberEmojis(de.kaktushose.levelbot.util.NumberEmojis) ErrorHandler(net.dv8tion.jda.api.exceptions.ErrorHandler) ErrorHandler(net.dv8tion.jda.api.exceptions.ErrorHandler) BotUser(de.kaktushose.levelbot.database.model.BotUser) Message(net.dv8tion.jda.api.entities.Message) ReactionWaiter(de.kaktushose.discord.reactionwaiter.ReactionWaiter) Item(de.kaktushose.levelbot.shop.data.items.Item) TextChannel(net.dv8tion.jda.api.entities.TextChannel) MessageBuilder(net.dv8tion.jda.api.MessageBuilder) Member(net.dv8tion.jda.api.entities.Member)

Aggregations

UNKNOWN_MESSAGE (net.dv8tion.jda.api.requests.ErrorResponse.UNKNOWN_MESSAGE)5 Sentry (io.sentry.Sentry)4 Collectors (java.util.stream.Collectors)4 Nonnull (javax.annotation.Nonnull)4 MessageUtils (me.duncte123.botcommons.messaging.MessageUtils)4 CommandContext (ml.duncte123.skybot.objects.command.CommandContext)4 ModerationUtils.modLog (ml.duncte123.skybot.utils.ModerationUtils.modLog)4 Permission (net.dv8tion.jda.api.Permission)4 TimeUnit (java.util.concurrent.TimeUnit)3 Consumer (java.util.function.Consumer)3 GuildSetting (com.dunctebot.models.settings.GuildSetting)2 Instant (java.time.Instant)2 DateTimeFormatter (java.time.format.DateTimeFormatter)2 java.util (java.util)2 List (java.util.List)2 CompletableFuture (java.util.concurrent.CompletableFuture)2 ExecutionException (java.util.concurrent.ExecutionException)2 Executors (java.util.concurrent.Executors)2 ScheduledExecutorService (java.util.concurrent.ScheduledExecutorService)2 Matcher (java.util.regex.Matcher)2