Search in sources :

Example 6 with InteractionHook

use of net.dv8tion.jda.api.interactions.InteractionHook in project cds by iamysko.

the class SlashCommandListener method onSlashCommand.

@Override
public void onSlashCommand(SlashCommandEvent event) {
    boolean perm = false;
    if (RoleUtils.findRole(event.getMember(), RoleUtils.ROLE_SERVER_MANAGER) != null) {
        perm = true;
    } else if (RoleUtils.findRole(event.getMember(), RoleUtils.ROLE_SENIOR_MODERATOR) != null) {
        perm = true;
    } else if (RoleUtils.findRole(event.getMember(), RoleUtils.ROLE_MODERATOR) != null) {
        perm = true;
    } else if (RoleUtils.findRole(event.getMember(), RoleUtils.ROLE_TRIAL_MODERATOR) != null) {
        perm = true;
    } else {
        perm = false;
    }
    if (perm) {
        final TextChannel commandChannel = event.getGuild().getTextChannelById(Properties.CHANNEL_COMMANDS_ID);
        final Member author = event.getMember();
        final String authorMention = author.getAsMention();
        if (event.getName().equals(SlashCommandConstants.COMMAND_HELP)) {
            event.reply(StringBuilds.getHelpMessage(authorMention)).queue();
        } else if (event.getName().equals(SlashCommandConstants.COMMAND_ABOUT)) {
            event.reply(StringBuilds.getAboutMessage(authorMention)).queue();
        } else if (event.getName().equals(SlashCommandConstants.COMMAND_USER_INFO)) {
            Member theMember = event.getGuild().getMemberById(event.getOption("user").getAsString());
            RestAction<User> userData = event.getJDA().retrieveUserById(event.getOption("user").getAsString());
            User theUser = userData.complete();
            EmbedBuilder embed = EmbedBuilds.getUserInfoEmbed(theMember, theUser);
            ReplyAction reply = event.replyEmbeds(embed.build());
            if (theMember != null && theMember.getNickname() != null && RoleUtils.findRole(theMember, RoleUtils.ROLE_VERIFIED) != null) {
                reply.addActionRow(Button.danger("RobloxInformation/" + theMember.getNickname() + "/" + theMember.getId(), "Roblox Information"));
            }
            reply.queue();
        } else if (event.getName().equals(SlashCommandConstants.COMMAND_ROBLOX_USER_INFO)) {
            try {
                EmbedBuilder embed = EmbedBuilds.getRobloxUserInfoEmbed(event.getOption("username").getAsString(), null);
                event.replyEmbeds(embed.build()).queue();
            } catch (Exception e) {
                event.reply("It appears the Roblox API is currently not responding! Please Try again later! :(" + e).queue();
            }
        } else if (event.getName().equals(SlashCommandConstants.COMMAND_SCAN_URL)) {
            event.deferReply().queue();
            InteractionHook hook = event.getHook();
            new Thread(() -> {
                EmbedBuilder embed = null;
                try {
                    embed = EmbedBuilds.scanUrl(event.getOption("url").getAsString(), event.getJDA().getSelfUser().getEffectiveAvatarUrl());
                } catch (InterruptedException e) {
                    embed = EmbedBuilds.ApiError();
                }
                hook.editOriginalEmbeds(embed.build()).queue();
            }).start();
        } else {
            event.reply("The Command you tried to execute does not exist!").queue();
        }
    } else {
        event.reply("Missing permissions!").setEphemeral(true).queue();
    }
}
Also used : ReplyAction(net.dv8tion.jda.api.requests.restaction.interactions.ReplyAction) TextChannel(net.dv8tion.jda.api.entities.TextChannel) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) User(net.dv8tion.jda.api.entities.User) InteractionHook(net.dv8tion.jda.api.interactions.InteractionHook) Member(net.dv8tion.jda.api.entities.Member)

Example 7 with InteractionHook

use of net.dv8tion.jda.api.interactions.InteractionHook in project dDiscordBot by DenizenScript.

the class DiscordInteractionCommand method execute.

@Override
public void execute(ScriptEntry scriptEntry) {
    ElementTag instruction = scriptEntry.getElement("instruction");
    DiscordInteractionTag interaction = scriptEntry.requiredArgForPrefix("interaction", DiscordInteractionTag.class);
    boolean ephemeral = scriptEntry.argAsBoolean("ephemeral");
    ElementTag attachFileName = scriptEntry.argForPrefixAsElement("attach_file_name", null);
    ElementTag attachFileText = scriptEntry.argForPrefixAsElement("attach_file_text", null);
    ObjectTag rows = scriptEntry.argForPrefix("rows", ObjectTag.class, true);
    ObjectTag message = scriptEntry.getObjectTag("message");
    if (scriptEntry.dbCallShouldDebug()) {
        // Note: attachFileText intentionally at end
        Debug.report(scriptEntry, getName(), instruction, interaction, ephemeral, rows, message, attachFileName, attachFileText);
    }
    DiscordInteractionInstruction instructionEnum = DiscordInteractionInstruction.valueOf(instruction.asString().toUpperCase());
    Runnable runner = () -> {
        try {
            switch(instructionEnum) {
                case DEFER:
                    {
                        if (interaction.interaction == null) {
                            handleError(scriptEntry, "Invalid interaction! Has it expired?");
                            return;
                        }
                        if (interaction.interaction instanceof IReplyCallback) {
                            ((IReplyCallback) interaction.interaction).deferReply(ephemeral).complete();
                        } else {
                            handleError(scriptEntry, "Interaction is not a reply callback!");
                        }
                        break;
                    }
                case EDIT:
                case REPLY:
                    {
                        if (interaction.interaction == null) {
                            handleError(scriptEntry, "Invalid interaction! Has it expired?");
                            return;
                        } else /*
                         * Messages aren't allowed to have attachments in ephemeral messages
                         * Since you can't see if the acknowledged message is ephemeral or not, this is a requirement so we don't have to try/catch
                         */
                        if (message == null) {
                            handleError(scriptEntry, "Must have a message!");
                            return;
                        }
                        MessageEmbed embed = null;
                        List<ActionRow> actionRows = DiscordMessageCommand.createRows(scriptEntry, rows);
                        if (message.shouldBeType(DiscordEmbedTag.class)) {
                            embed = message.asType(DiscordEmbedTag.class, scriptEntry.context).build(scriptEntry.getContext()).build();
                        }
                        if (instructionEnum == DiscordInteractionInstruction.EDIT) {
                            WebhookMessageUpdateAction<Message> action;
                            InteractionHook hook = ((IDeferrableCallback) interaction.interaction).getHook();
                            if (embed != null) {
                                action = hook.editOriginalEmbeds(embed);
                            } else {
                                action = hook.editOriginal(message.toString());
                            }
                            if (attachFileName != null) {
                                if (attachFileText != null) {
                                    action = action.addFile(attachFileText.asString().getBytes(StandardCharsets.UTF_8), attachFileName.asString());
                                } else {
                                    handleError(scriptEntry, "Failed to send attachment - missing content?");
                                }
                            }
                            if (actionRows != null) {
                                action = action.setActionRows(actionRows);
                            }
                            action.complete();
                        } else if (interaction.interaction.isAcknowledged()) {
                            WebhookMessageAction<Message> action;
                            InteractionHook hook = ((IDeferrableCallback) interaction.interaction).getHook();
                            if (embed != null) {
                                action = hook.sendMessageEmbeds(embed);
                            } else {
                                action = hook.sendMessage(message.toString());
                            }
                            if (attachFileName != null) {
                                if (attachFileText != null) {
                                    action = action.addFile(attachFileText.asString().getBytes(StandardCharsets.UTF_8), attachFileName.asString());
                                } else {
                                    handleError(scriptEntry, "Failed to send attachment - missing content?");
                                }
                            }
                            if (actionRows != null) {
                                action = action.addActionRows(actionRows);
                            }
                            action.complete();
                        } else {
                            ReplyCallbackAction action;
                            IReplyCallback replyTo = (IReplyCallback) interaction.interaction;
                            if (embed != null) {
                                action = replyTo.replyEmbeds(embed);
                            } else {
                                action = replyTo.reply(message.toString());
                            }
                            if (attachFileName != null) {
                                if (attachFileText != null) {
                                    action = action.addFile(attachFileText.asString().getBytes(StandardCharsets.UTF_8), attachFileName.asString());
                                } else {
                                    handleError(scriptEntry, "Failed to send attachment - missing content?");
                                }
                            }
                            if (actionRows != null) {
                                action = action.addActionRows(actionRows);
                            }
                            action = action.setEphemeral(ephemeral);
                            action.complete();
                        }
                        break;
                    }
                case DELETE:
                    {
                        if (interaction.interaction == null) {
                            handleError(scriptEntry, "Invalid interaction! Has it expired?");
                            return;
                        }
                        ((IDeferrableCallback) interaction.interaction).getHook().deleteOriginal().complete();
                        break;
                    }
            }
        } catch (Exception ex) {
            handleError(scriptEntry, ex);
        }
    };
    Bukkit.getScheduler().runTaskAsynchronously(DenizenDiscordBot.instance, () -> {
        runner.run();
        scriptEntry.setFinished(true);
    });
}
Also used : IReplyCallback(net.dv8tion.jda.api.interactions.callbacks.IReplyCallback) MessageEmbed(net.dv8tion.jda.api.entities.MessageEmbed) Message(net.dv8tion.jda.api.entities.Message) DiscordInteractionTag(com.denizenscript.ddiscordbot.objects.DiscordInteractionTag) ActionRow(net.dv8tion.jda.api.interactions.components.ActionRow) InvalidArgumentsException(com.denizenscript.denizencore.exceptions.InvalidArgumentsException) ObjectTag(com.denizenscript.denizencore.objects.ObjectTag) InteractionHook(net.dv8tion.jda.api.interactions.InteractionHook) DiscordEmbedTag(com.denizenscript.ddiscordbot.objects.DiscordEmbedTag) WebhookMessageAction(net.dv8tion.jda.api.requests.restaction.WebhookMessageAction) ElementTag(com.denizenscript.denizencore.objects.core.ElementTag) ReplyCallbackAction(net.dv8tion.jda.api.requests.restaction.interactions.ReplyCallbackAction) IDeferrableCallback(net.dv8tion.jda.api.interactions.callbacks.IDeferrableCallback)

Example 8 with InteractionHook

use of net.dv8tion.jda.api.interactions.InteractionHook in project Discord-Core-Bot-Apple by demodude4u.

the class DiscordBot method startUp.

@Override
protected void startUp() throws Exception {
    info.addTechnology("[DCBA](https://github.com/demodude4u/Discord-Core-Bot-Apple)", Optional.empty(), "Discord Core Bot Apple");
    info.addTechnology("[JDA](https://github.com/DV8FromTheWorld/JDA)", Optional.of("5.0 alpha"), "Java Discord API");
    if (configJson.has("command_prefix")) {
        setCommandPrefix(Optional.of(configJson.getString("command_prefix")));
    }
    JDABuilder builder = // 
    JDABuilder.createDefault(configJson.getString("bot_token")).setEnableShutdownHook(// 
    false).addEventListeners(new ListenerAdapter() {

        @Override
        public void onCommandAutoCompleteInteraction(CommandAutoCompleteInteractionEvent event) {
            SlashCommandDefinition commandDefinition = commandSlash.get(event.getCommandPath());
            Optional<AutoCompleteHandler> autoCompleteHandler = commandDefinition.getAutoCompleteHandler();
            if (autoCompleteHandler.isPresent()) {
                AutoCompleteEvent autoCompleteEvent = new AutoCompleteEvent(event);
                autoCompleteHandler.get().handleAutoComplete(autoCompleteEvent);
            }
        }

        @Override
        public void onMessageContextInteraction(MessageContextInteractionEvent event) {
            MessageCommandDefinition commandDefinition = commandMessage.get(event.getName());
            boolean ephemeral = commandDefinition.hasRestriction(CommandRestriction.EPHEMERAL);
            CommandReporting reporting = createReporting(event);
            InteractionHook hook = event.deferReply(ephemeral).complete();
            MessageCommandEvent commandEvent = new MessageCommandEvent(event, reporting, hook, ephemeral);
            commandService.submit(() -> {
                try {
                    commandDefinition.getHandler().handleCommand(commandEvent);
                } catch (Exception e) {
                    reporting.addException(e);
                } finally {
                    if (!commandDefinition.hasRestriction(CommandRestriction.NO_REPORTING)) {
                        submitReport(reporting);
                    }
                    if (!reporting.getExceptions().isEmpty()) {
                        commandEvent.replyEmbed(new EmbedBuilder().setColor(Color.red).appendDescription("Sorry, there was a problem completing your request.\n" + reporting.getExceptions().stream().map(e -> "`" + e.getMessage() + "`").distinct().collect(Collectors.joining("\n"))).build());
                    }
                    if (!commandEvent.hasReplied()) {
                        hook.deleteOriginal().complete();
                    }
                }
            });
        }

        @Override
        public void onMessageDelete(MessageDeleteEvent event) {
            if (textWatcher.isPresent()) {
                textWatcher.get().deletedMessage(event);
            }
        }

        @Override
        public void onMessageReactionAdd(MessageReactionAddEvent event) {
            if (reactionWatcher.isPresent()) {
                reactionWatcher.get().seenReaction(event);
            }
        }

        @Override
        public void onMessageReactionRemove(MessageReactionRemoveEvent event) {
            if (reactionWatcher.isPresent()) {
                reactionWatcher.get().seenReactionRemoved(event);
            }
        }

        @Override
        public void onMessageReactionRemoveAll(MessageReactionRemoveAllEvent event) {
            if (reactionWatcher.isPresent()) {
                reactionWatcher.get().seenAllReactionRemoved(event);
            }
        }

        @Override
        public void onMessageReceived(MessageReceivedEvent event) {
            if (textWatcher.isPresent()) {
                textWatcher.get().seenMessage(event);
            }
            Message message = event.getMessage();
            MessageChannel channel = message.getChannel();
            String rawContent = message.getContentRaw().trim();
            String mentionMe = "<@!" + event.getJDA().getSelfUser().getId() + ">";
            // String mentionMe = event.getJDA().getSelfUser().getAsMention();
            boolean isPrivateChannel = channel instanceof PrivateChannel;
            if (isPrivateChannel && ignorePrivateChannels) {
                return;
            }
            boolean startsWithMentionMe = message.getMentionedUsers().stream().anyMatch(u -> u.getIdLong() == event.getJDA().getSelfUser().getIdLong()) && rawContent.startsWith(mentionMe);
            if (startsWithMentionMe) {
                rawContent = rawContent.substring(mentionMe.length()).trim();
            }
            Optional<String> effectivePrefix = getOldCommandPrefix(event);
            boolean startsWithCommandPrefix = effectivePrefix.isPresent() && rawContent.startsWith(effectivePrefix.get());
            if (startsWithCommandPrefix) {
                rawContent = rawContent.substring(effectivePrefix.get().length()).trim();
            }
            if (!event.getAuthor().isBot() && (isPrivateChannel || startsWithMentionMe || startsWithCommandPrefix)) {
                String[] split = rawContent.split("\\s+");
                if (split.length > 0) {
                    String command = split[0];
                    SlashCommandDefinition commandDefinition = commandLegacy.get(command.toLowerCase());
                    if (commandDefinition != null) {
                        boolean isPermitted = checkPermitted(channel, event.getMember(), commandDefinition);
                        if (isPermitted) {
                            event.getChannel().sendMessageEmbeds(new EmbedBuilder().appendDescription("Please use /" + commandDefinition.getPath().replace("/", " ")).build()).complete();
                        }
                    }
                }
            }
        }

        @Override
        public void onMessageUpdate(MessageUpdateEvent event) {
            if (textWatcher.isPresent()) {
                textWatcher.get().editedMessage(event);
            }
        }

        @Override
        public void onSlashCommandInteraction(SlashCommandInteractionEvent event) {
            SlashCommandDefinition commandDefinition = commandSlash.get(event.getCommandPath());
            boolean ephemeral = commandDefinition.hasRestriction(CommandRestriction.EPHEMERAL);
            CommandReporting reporting = createReporting(event);
            InteractionHook hook = event.deferReply(ephemeral).complete();
            SlashCommandEvent commandEvent = new SlashCommandEvent(event, reporting, hook, ephemeral);
            commandService.submit(() -> {
                try {
                    commandDefinition.getHandler().handleCommand(commandEvent);
                } catch (Exception e) {
                    System.err.println("Uncaught Exception!");
                    e.printStackTrace();
                    reporting.addException(e);
                } finally {
                    if (!commandDefinition.hasRestriction(CommandRestriction.NO_REPORTING)) {
                        submitReport(reporting);
                    }
                    if (!reporting.getExceptions().isEmpty()) {
                        commandEvent.replyEmbed(new EmbedBuilder().setColor(Color.red).appendDescription("Sorry, there was a problem completing your request.\n" + reporting.getExceptions().stream().map(e -> "`" + e.getMessage() + "`").distinct().collect(Collectors.joining("\n"))).build());
                    }
                    if (!commandEvent.hasReplied()) {
                        hook.deleteOriginal().complete();
                    }
                }
            });
        }
    });
    if (customSetup != null) {
        builder = customSetup.apply(builder);
    }
    jda = builder.build().awaitReady();
    jda.setRequiredScopes("bot", "applications.commands");
    reportingUserID = Optional.ofNullable(configJson.optString("reporting_user_id", null));
    reportingChannelID = Optional.ofNullable(configJson.optString("reporting_channel_id", null));
    if (configJson.has("debug_guild_commands")) {
        String guildId = configJson.getString("debug_guild_commands");
        Guild guild = jda.getGuildById(guildId);
        CommandListUpdateAction updateCommands = guild.updateCommands();
        buildUpdateCommands(updateCommands);
        updateCommands.queue();
    }
    CommandListUpdateAction updateCommands = jda.updateCommands();
    buildUpdateCommands(updateCommands);
    updateCommands.queue();
}
Also used : Color(java.awt.Color) OptionType(net.dv8tion.jda.api.interactions.commands.OptionType) Arrays(java.util.Arrays) Permission(net.dv8tion.jda.api.Permission) MessageUpdateEvent(net.dv8tion.jda.api.events.message.MessageUpdateEvent) Scanner(java.util.Scanner) Member(net.dv8tion.jda.api.entities.Member) TextChannel(net.dv8tion.jda.api.entities.TextChannel) ChannelType(net.dv8tion.jda.api.entities.ChannelType) CommandInteractionPayload(net.dv8tion.jda.api.interactions.commands.CommandInteractionPayload) JSONException(org.json.JSONException) JSONObject(org.json.JSONObject) Guild(net.dv8tion.jda.api.entities.Guild) Map(java.util.Map) OptionMapping(net.dv8tion.jda.api.interactions.commands.OptionMapping) PrintWriter(java.io.PrintWriter) Message(net.dv8tion.jda.api.entities.Message) SubcommandData(net.dv8tion.jda.api.interactions.commands.build.SubcommandData) SlashCommandInteractionEvent(net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent) CommandAutoCompleteInteractionEvent(net.dv8tion.jda.api.events.interaction.command.CommandAutoCompleteInteractionEvent) Instant(java.time.Instant) MessageReactionAddEvent(net.dv8tion.jda.api.events.message.react.MessageReactionAddEvent) Collectors(java.util.stream.Collectors) Executors(java.util.concurrent.Executors) SlashCommandData(net.dv8tion.jda.api.interactions.commands.build.SlashCommandData) List(java.util.List) MessageReactionRemoveAllEvent(net.dv8tion.jda.api.events.message.react.MessageReactionRemoveAllEvent) MessageDeleteEvent(net.dv8tion.jda.api.events.message.MessageDeleteEvent) Entry(java.util.Map.Entry) Optional(java.util.Optional) CommandListUpdateAction(net.dv8tion.jda.api.requests.restaction.CommandListUpdateAction) MessageReceivedEvent(net.dv8tion.jda.api.events.message.MessageReceivedEvent) MessageChannel(net.dv8tion.jda.api.entities.MessageChannel) MessageReactionRemoveEvent(net.dv8tion.jda.api.events.message.react.MessageReactionRemoveEvent) JDA(net.dv8tion.jda.api.JDA) MessageContextInteractionEvent(net.dv8tion.jda.api.events.interaction.command.MessageContextInteractionEvent) LocalDateTime(java.time.LocalDateTime) Function(java.util.function.Function) PrivateChannel(net.dv8tion.jda.api.entities.PrivateChannel) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) JDABuilder(net.dv8tion.jda.api.JDABuilder) AbstractIdleService(com.google.common.util.concurrent.AbstractIdleService) SubcommandGroupData(net.dv8tion.jda.api.interactions.commands.build.SubcommandGroupData) ExecutorService(java.util.concurrent.ExecutorService) StringWriter(java.io.StringWriter) ListenerAdapter(net.dv8tion.jda.api.hooks.ListenerAdapter) IOException(java.io.IOException) FileInputStream(java.io.FileInputStream) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) CommandData(net.dv8tion.jda.api.interactions.commands.build.CommandData) Commands(net.dv8tion.jda.api.interactions.commands.build.Commands) ChronoUnit(java.time.temporal.ChronoUnit) InteractionHook(net.dv8tion.jda.api.interactions.InteractionHook) MessageEmbed(net.dv8tion.jda.api.entities.MessageEmbed) PrivateChannel(net.dv8tion.jda.api.entities.PrivateChannel) MessageReactionRemoveEvent(net.dv8tion.jda.api.events.message.react.MessageReactionRemoveEvent) Message(net.dv8tion.jda.api.entities.Message) JDABuilder(net.dv8tion.jda.api.JDABuilder) MessageUpdateEvent(net.dv8tion.jda.api.events.message.MessageUpdateEvent) Guild(net.dv8tion.jda.api.entities.Guild) CommandAutoCompleteInteractionEvent(net.dv8tion.jda.api.events.interaction.command.CommandAutoCompleteInteractionEvent) MessageReceivedEvent(net.dv8tion.jda.api.events.message.MessageReceivedEvent) SlashCommandInteractionEvent(net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent) MessageReactionRemoveAllEvent(net.dv8tion.jda.api.events.message.react.MessageReactionRemoveAllEvent) MessageReactionAddEvent(net.dv8tion.jda.api.events.message.react.MessageReactionAddEvent) Optional(java.util.Optional) CommandListUpdateAction(net.dv8tion.jda.api.requests.restaction.CommandListUpdateAction) JSONException(org.json.JSONException) IOException(java.io.IOException) ListenerAdapter(net.dv8tion.jda.api.hooks.ListenerAdapter) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) InteractionHook(net.dv8tion.jda.api.interactions.InteractionHook) MessageChannel(net.dv8tion.jda.api.entities.MessageChannel) MessageContextInteractionEvent(net.dv8tion.jda.api.events.interaction.command.MessageContextInteractionEvent) MessageDeleteEvent(net.dv8tion.jda.api.events.message.MessageDeleteEvent)

Example 9 with InteractionHook

use of net.dv8tion.jda.api.interactions.InteractionHook in project GeyserDiscordBot by GeyserMC.

the class PingCommand method execute.

@Override
protected void execute(SlashCommandEvent event) {
    // Defer to wait for us to load a response and allows for files to be uploaded
    InteractionHook interactionHook = event.deferReply().complete();
    String ip = event.getOption("server").getAsString();
    interactionHook.editOriginalEmbeds(handle(ip)).queue();
}
Also used : InteractionHook(net.dv8tion.jda.api.interactions.InteractionHook)

Example 10 with InteractionHook

use of net.dv8tion.jda.api.interactions.InteractionHook in project GeyserDiscordBot by GeyserMC.

the class QueueCommand method execute.

@Override
protected void execute(SlashCommandEvent event) {
    // Defer to wait for us to load a response and allows for files to be uploaded
    InteractionHook interactionHook = event.deferReply().complete();
    interactionHook.editOriginalEmbeds(handle()).queue();
}
Also used : InteractionHook(net.dv8tion.jda.api.interactions.InteractionHook)

Aggregations

InteractionHook (net.dv8tion.jda.api.interactions.InteractionHook)14 Member (net.dv8tion.jda.api.entities.Member)4 SlashCommandInteractionEvent (net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent)4 OptionMapping (net.dv8tion.jda.api.interactions.commands.OptionMapping)4 EmbedBuilder (net.dv8tion.jda.api.EmbedBuilder)3 JDA (net.dv8tion.jda.api.JDA)3 User (net.dv8tion.jda.api.entities.User)3 ActionRow (net.dv8tion.jda.api.interactions.components.ActionRow)3 IOException (java.io.IOException)2 JDABuilder (net.dv8tion.jda.api.JDABuilder)2 Permission (net.dv8tion.jda.api.Permission)2 Message (net.dv8tion.jda.api.entities.Message)2 MessageChannel (net.dv8tion.jda.api.entities.MessageChannel)2 MessageEmbed (net.dv8tion.jda.api.entities.MessageEmbed)2 TextChannel (net.dv8tion.jda.api.entities.TextChannel)2 ListenerAdapter (net.dv8tion.jda.api.hooks.ListenerAdapter)2 OptionType (net.dv8tion.jda.api.interactions.commands.OptionType)2 Commands (net.dv8tion.jda.api.interactions.commands.build.Commands)2 CommandListUpdateAction (net.dv8tion.jda.api.requests.restaction.CommandListUpdateAction)2 DiscordEmbedTag (com.denizenscript.ddiscordbot.objects.DiscordEmbedTag)1