Search in sources :

Example 1 with LinkedDataObject

use of at.xirado.bean.data.LinkedDataObject in project Bean by Xirado.

the class InteractionCommandHandler method handleSlashCommand.

public void handleSlashCommand(@NotNull SlashCommandInteractionEvent event, @Nullable Member member) {
    Runnable r = () -> {
        try {
            if (!event.isFromGuild())
                return;
            Guild guild = event.getGuild();
            SlashCommand command = null;
            long guildId = event.getGuild().getIdLong();
            if (registeredGuildCommands.containsKey(guildId)) {
                List<SlashCommand> guildCommands = registeredGuildCommands.get(guildId).stream().filter(cmd -> cmd instanceof SlashCommand).map(cmd -> (SlashCommand) cmd).toList();
                SlashCommand guildCommand = guildCommands.stream().filter(cmd -> cmd.getCommandName().equalsIgnoreCase(event.getName())).findFirst().orElse(null);
                if (guildCommand != null)
                    command = guildCommand;
            }
            if (command == null) {
                SlashCommand globalCommand = getRegisteredSlashCommands().stream().filter(cmd -> cmd.getCommandName().equalsIgnoreCase(event.getName())).findFirst().orElse(null);
                if (globalCommand != null)
                    command = globalCommand;
            }
            if (command != null) {
                SlashCommandContext ctx = new SlashCommandContext(event);
                List<Permission> neededPermissions = command.getRequiredUserPermissions();
                List<Permission> neededBotPermissions = command.getRequiredBotPermissions();
                if (neededPermissions != null && !member.hasPermission((GuildChannel) event.getChannel(), neededPermissions)) {
                    event.reply(LocaleLoader.ofGuild(guild).get("general.no_perms", String.class)).queue();
                    return;
                }
                if (neededBotPermissions != null && !event.getGuild().getSelfMember().hasPermission((GuildChannel) event.getChannel(), neededBotPermissions)) {
                    event.reply(LocaleLoader.ofGuild(guild).get("general.no_bot_perms1", String.class)).queue();
                    return;
                }
                if (command.getCommandFlags().contains(CommandFlag.DJ_ONLY)) {
                    if (!ctx.getGuildData().isDJ(member)) {
                        event.replyEmbeds(EmbedUtil.errorEmbed("You need to be a DJ to do this!")).queue();
                        return;
                    }
                }
                if (command.getCommandFlags().contains(CommandFlag.MUST_BE_IN_VC)) {
                    GuildVoiceState guildVoiceState = member.getVoiceState();
                    if (guildVoiceState == null || !guildVoiceState.inAudioChannel()) {
                        event.replyEmbeds(EmbedUtil.errorEmbed("You are not connected to a voice-channel!")).queue();
                        return;
                    }
                }
                if (command.getCommandFlags().contains(CommandFlag.MUST_BE_IN_SAME_VC)) {
                    GuildVoiceState voiceState = member.getVoiceState();
                    AudioManager manager = event.getGuild().getAudioManager();
                    if (manager.isConnected()) {
                        if (!manager.getConnectedChannel().equals(voiceState.getChannel())) {
                            event.replyEmbeds(EmbedUtil.errorEmbed("You must be listening in " + manager.getConnectedChannel().getAsMention() + "to do this!")).setEphemeral(true).queue();
                            return;
                        }
                    }
                }
                if (command.getCommandFlags().contains(CommandFlag.REQUIRES_LAVALINK_NODE)) {
                    if (!ctx.isLavalinkNodeAvailable()) {
                        event.replyEmbeds(EmbedUtil.errorEmbed("There are currently no voice nodes available!\nIf the issue persists, please leave a message on our support server!")).addActionRow(Util.getSupportButton()).queue();
                        return;
                    }
                }
                command.executeCommand(event, ctx);
                Metrics.COMMANDS.labels("success").inc();
            }
        } catch (Exception e) {
            Metrics.COMMANDS.labels("failed").inc();
            LinkedDataObject translation = event.getGuild() == null ? LocaleLoader.getForLanguage("en_US") : LocaleLoader.ofGuild(event.getGuild());
            if (event.isAcknowledged())
                event.getHook().sendMessageEmbeds(EmbedUtil.errorEmbed(translation.getString("general.unknown_error_occured"))).setEphemeral(true).queue(s -> {
                }, ex -> {
                });
            else
                event.replyEmbeds(EmbedUtil.errorEmbed(translation.getString("general.unknown_error_occured"))).setEphemeral(true).queue(s -> {
                }, ex -> {
                });
            LOGGER.error("Could not execute slash-command", e);
            StringBuilder path = new StringBuilder("/" + event.getCommandPath().replace("/", " "));
            for (OptionMapping option : event.getOptions()) {
                path.append(" *").append(option.getName()).append("* : ").append("`").append(option.getAsString()).append("`");
            }
            EmbedBuilder builder = new EmbedBuilder().setTitle("An error occurred while executing a slash-command!").addField("Guild", event.getGuild() == null ? "None (Direct message)" : event.getGuild().getIdLong() + " (" + event.getGuild().getName() + ")", true).addField("Channel", event.getGuild() == null ? "None (Direct message)" : event.getChannel().getName(), true).addField("User", event.getUser().getAsMention() + " (" + event.getUser().getAsTag() + ")", true).addField("Command", path.toString(), false).setColor(EmbedUtil.ERROR_COLOR);
            event.getJDA().openPrivateChannelById(Bean.OWNER_ID).flatMap(c -> c.sendMessageEmbeds(builder.build()).content("```fix\n" + ExceptionUtils.getStackTrace(e) + "\n```")).queue();
        }
    };
    Bean.getInstance().getCommandExecutor().execute(r);
}
Also used : LocaleLoader(at.xirado.bean.translation.LocaleLoader) MessageContextInteractionEvent(net.dv8tion.jda.api.events.interaction.command.MessageContextInteractionEvent) Permission(net.dv8tion.jda.api.Permission) AudioManager(net.dv8tion.jda.api.managers.AudioManager) LoggerFactory(org.slf4j.LoggerFactory) Util(at.xirado.bean.misc.Util) Member(net.dv8tion.jda.api.entities.Member) Command(net.dv8tion.jda.api.interactions.commands.Command) ArrayList(java.util.ArrayList) at.xirado.bean.command.slashcommands.moderation(at.xirado.bean.command.slashcommands.moderation) UserContextInteractionEvent(net.dv8tion.jda.api.events.interaction.command.UserContextInteractionEvent) Guild(net.dv8tion.jda.api.entities.Guild) at.xirado.bean.command.slashcommands.music(at.xirado.bean.command.slashcommands.music) GuildVoiceState(net.dv8tion.jda.api.entities.GuildVoiceState) OptionMapping(net.dv8tion.jda.api.interactions.commands.OptionMapping) Map(java.util.Map) GenericCommand(at.xirado.bean.command.GenericCommand) SlashCommand(at.xirado.bean.command.SlashCommand) EmbedUtil(at.xirado.bean.misc.EmbedUtil) UserContextCommand(at.xirado.bean.command.context.UserContextCommand) MockContextMenuCommand(at.xirado.bean.command.context.message.MockContextMenuCommand) Logger(org.slf4j.Logger) at.xirado.bean.command.slashcommands(at.xirado.bean.command.slashcommands) GuildChannel(net.dv8tion.jda.api.entities.GuildChannel) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Metrics(at.xirado.bean.misc.Metrics) SlashCommandInteractionEvent(net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent) MessageContextCommand(at.xirado.bean.command.context.MessageContextCommand) CommandAutoCompleteInteractionEvent(net.dv8tion.jda.api.events.interaction.command.CommandAutoCompleteInteractionEvent) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) Consumer(java.util.function.Consumer) Nullable(org.jetbrains.annotations.Nullable) List(java.util.List) CommandFlag(at.xirado.bean.command.CommandFlag) at.xirado.bean.command.slashcommands.leveling(at.xirado.bean.command.slashcommands.leveling) SlashCommandContext(at.xirado.bean.command.SlashCommandContext) CommandListUpdateAction(net.dv8tion.jda.api.requests.restaction.CommandListUpdateAction) Bean(at.xirado.bean.Bean) NotNull(org.jetbrains.annotations.NotNull) Collections(java.util.Collections) SlapContextMenuCommand(at.xirado.bean.command.context.user.SlapContextMenuCommand) LinkedDataObject(at.xirado.bean.data.LinkedDataObject) ExceptionUtils(org.apache.commons.lang3.exception.ExceptionUtils) OptionMapping(net.dv8tion.jda.api.interactions.commands.OptionMapping) LinkedDataObject(at.xirado.bean.data.LinkedDataObject) GuildVoiceState(net.dv8tion.jda.api.entities.GuildVoiceState) Guild(net.dv8tion.jda.api.entities.Guild) SlashCommand(at.xirado.bean.command.SlashCommand) SlashCommandContext(at.xirado.bean.command.SlashCommandContext) AudioManager(net.dv8tion.jda.api.managers.AudioManager) GuildChannel(net.dv8tion.jda.api.entities.GuildChannel) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) ArrayList(java.util.ArrayList) List(java.util.List)

Example 2 with LinkedDataObject

use of at.xirado.bean.data.LinkedDataObject in project Bean by Xirado.

the class RandomFactCommand method executeCommand.

@Override
public void executeCommand(@NotNull SlashCommandInteractionEvent event, @NotNull SlashCommandContext ctx) {
    try {
        String requestURL = "";
        if (ctx.getLanguage().toString().equals("de.json")) {
            requestURL = "https://uselessfacts.jsph.pl/random.json?language=de";
        } else {
            requestURL = "https://uselessfacts.jsph.pl/random.json?language=en";
        }
        URL url = new URL(requestURL);
        LinkedDataObject json = LinkedDataObject.parse(url);
        if (json == null) {
            ctx.replyError(ctx.getLocalized("commands.fact.api_down")).queue();
            return;
        }
        EmbedBuilder builder = new EmbedBuilder().setTitle(ctx.getLocalized("commands.fact.title")).setDescription(json.getString("text") + "\n\n[" + ctx.getLocalized("commands.fact.source") + "](" + json.getString("source_url") + ")").setColor(0x152238);
        ctx.reply(builder.build()).queue();
    } catch (Exception e) {
        ctx.replyError(ctx.getLocalized("general.unknown_error_occured")).queue();
    }
}
Also used : LinkedDataObject(at.xirado.bean.data.LinkedDataObject) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) URL(java.net.URL)

Example 3 with LinkedDataObject

use of at.xirado.bean.data.LinkedDataObject in project Bean by Xirado.

the class UrbanDictionaryCommand method executeCommand.

@Override
public void executeCommand(@NotNull SlashCommandInteractionEvent event, @NotNull SlashCommandContext ctx) {
    String phrase = event.getOption("phrase").getAsString();
    int index = event.getOption("definition") != null ? (int) event.getOption("definition").getAsLong() : 1;
    if (index < 1)
        index = 1;
    event.deferReply().queue();
    LinkedDataObject dataObject;
    try {
        String url = "http://api.urbandictionary.com/v0/define?term=" + phrase.replaceAll("\\s+", "+");
        Response response = Bean.getInstance().getOkHttpClient().newCall(new Request.Builder().url(url).build()).execute();
        dataObject = LinkedDataObject.parse(response.body().byteStream());
        response.close();
    } catch (Exception ex) {
        LOGGER.error("Could not get data from API!", ex);
        event.getHook().sendMessageEmbeds(EmbedUtil.errorEmbed("An error occurred, please try again later.")).queue();
        return;
    }
    UrbanDefinition[] results = dataObject.convertValueAt("list", UrbanDefinition[].class);
    if (results.length == 0) {
        EmbedBuilder builder = new EmbedBuilder().setColor(Color.decode("#1D2439")).setTitle(ctx.getLocalized("commands.urban.not_found")).setTimestamp(Instant.now());
        event.getHook().sendMessageEmbeds(builder.build()).queue();
        return;
    }
    if (results.length < index)
        index = results.length;
    UrbanDefinition result = results[index - 1];
    String description = result.getDefinition();
    Matcher matcher = PATTERN.matcher(description);
    description = matcher.replaceAll(match -> "[" + match.group().replaceAll("\\[|\\]", "") + "]" + "(https://urbandictionary.com/define.php?term=" + match.group().replaceAll("\\s+", "+").replaceAll("\\[|\\]", "") + ")");
    if (description.length() > 4096) {
        String replaceString = "... [**" + ctx.getLocalized("general.read_more") + "**](" + result.getPermalink() + ")";
        String split = description.substring(0, 4096 - replaceString.length());
        description = split + replaceString;
    }
    EmbedBuilder builder = new EmbedBuilder().setColor(Color.decode("#1D2439")).setTitle(result.getWord()).setTitle(result.getWord(), result.getPermalink()).setFooter(Util.ordinal(index) + " definition").setFooter(Util.ordinal(index) + " definition", "https://bean.bz/assets/udlogo.png").setDescription(description);
    String example = result.getExample();
    if (example != null) {
        boolean alreadyRecursive = example.startsWith("*") && example.endsWith("*");
        Matcher matcher2 = PATTERN.matcher(example);
        example = matcher2.replaceAll(match -> "[" + match.group().replaceAll("\\[|\\]", "") + "]" + "(https://www.urbandictionary.com/define.php?term=" + match.group().replaceAll(" ", "+").replaceAll("\\[|\\]", "") + ")");
        if (example.length() <= 1022)
            builder.addField(ctx.getLocalized("general.example"), ((alreadyRecursive) ? (example) : ("*" + example + "*")), false);
    }
    String authorUrl = "https://www.urbandictionary.com/author.php?author=";
    authorUrl += result.getAuthor().replaceAll("\\s+", "%20");
    builder.setTimestamp(Instant.parse(result.getWrittenOn()));
    builder.addField(ctx.getLocalized("general.author"), "[" + result.getAuthor() + "](" + authorUrl + ")\n\uD83D\uDC4D " + result.getUpvotes() + " \uD83D\uDC4E " + result.getDownvotes(), false);
    event.getHook().sendMessageEmbeds(builder.build()).queue();
}
Also used : Response(okhttp3.Response) OptionType(net.dv8tion.jda.api.interactions.commands.OptionType) Request(okhttp3.Request) Logger(org.slf4j.Logger) OptionData(net.dv8tion.jda.api.interactions.commands.build.OptionData) LoggerFactory(org.slf4j.LoggerFactory) SlashCommandInteractionEvent(net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent) Util(at.xirado.bean.misc.Util) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) Instant(java.time.Instant) java.awt(java.awt) Commands(net.dv8tion.jda.api.interactions.commands.build.Commands) Matcher(java.util.regex.Matcher) SlashCommandContext(at.xirado.bean.command.SlashCommandContext) Response(okhttp3.Response) SlashCommand(at.xirado.bean.command.SlashCommand) UrbanDefinition(at.xirado.bean.misc.urbandictionary.UrbanDefinition) Pattern(java.util.regex.Pattern) Bean(at.xirado.bean.Bean) NotNull(org.jetbrains.annotations.NotNull) LinkedDataObject(at.xirado.bean.data.LinkedDataObject) EmbedUtil(at.xirado.bean.misc.EmbedUtil) LinkedDataObject(at.xirado.bean.data.LinkedDataObject) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) UrbanDefinition(at.xirado.bean.misc.urbandictionary.UrbanDefinition) Matcher(java.util.regex.Matcher) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder)

Example 4 with LinkedDataObject

use of at.xirado.bean.data.LinkedDataObject in project Bean by Xirado.

the class SlashCommandContext method getLanguage.

public LinkedDataObject getLanguage() {
    Guild g = event.getGuild();
    LinkedDataObject language;
    if (g != null)
        language = LocaleLoader.ofGuild(g);
    else
        language = LocaleLoader.getForLanguage("en_US");
    return language;
}
Also used : LinkedDataObject(at.xirado.bean.data.LinkedDataObject) Guild(net.dv8tion.jda.api.entities.Guild)

Example 5 with LinkedDataObject

use of at.xirado.bean.data.LinkedDataObject in project Bean by Xirado.

the class InteractionCommandHandler method handleUserContextCommand.

public void handleUserContextCommand(@NotNull UserContextInteractionEvent event) {
    if (!event.isFromGuild())
        return;
    Guild guild = event.getGuild();
    Member member = event.getMember();
    UserContextCommand command = null;
    if (registeredGuildCommands.containsKey(guild.getIdLong())) {
        List<UserContextCommand> guildCommands = registeredGuildCommands.get(guild.getIdLong()).stream().filter(cmd -> cmd instanceof UserContextCommand).map(cmd -> (UserContextCommand) cmd).toList();
        UserContextCommand guildCommand = guildCommands.stream().filter(cmd -> cmd.getData().getName().equalsIgnoreCase(event.getName())).findFirst().orElse(null);
        if (guildCommand != null)
            command = guildCommand;
    }
    if (command == null) {
        UserContextCommand globalCommand = getRegisteredUserContextCommands().stream().filter(cmd -> cmd.getData().getName().equalsIgnoreCase(event.getName())).findFirst().orElse(null);
        if (globalCommand != null)
            command = globalCommand;
    }
    if (command == null)
        return;
    List<Permission> neededPermissions = command.getRequiredUserPermissions();
    List<Permission> neededBotPermissions = command.getRequiredBotPermissions();
    if (neededPermissions != null && !member.hasPermission((GuildChannel) event.getChannel(), neededPermissions)) {
        event.reply(LocaleLoader.ofGuild(guild).get("general.no_perms", String.class)).queue();
        return;
    }
    if (neededBotPermissions != null && !event.getGuild().getSelfMember().hasPermission((GuildChannel) event.getChannel(), neededBotPermissions)) {
        event.reply(LocaleLoader.ofGuild(guild).get("general.no_bot_perms1", String.class)).queue();
        return;
    }
    if (command.getCommandFlags().contains(CommandFlag.MUST_BE_IN_VC)) {
        GuildVoiceState guildVoiceState = member.getVoiceState();
        if (guildVoiceState == null || !guildVoiceState.inAudioChannel()) {
            event.replyEmbeds(EmbedUtil.errorEmbed("You are not connected to a voice-channel!")).queue();
            return;
        }
    }
    if (command.getCommandFlags().contains(CommandFlag.MUST_BE_IN_SAME_VC)) {
        GuildVoiceState voiceState = member.getVoiceState();
        AudioManager manager = event.getGuild().getAudioManager();
        if (manager.isConnected()) {
            if (!manager.getConnectedChannel().equals(voiceState.getChannel())) {
                event.replyEmbeds(EmbedUtil.errorEmbed("You must be listening in " + manager.getConnectedChannel().getAsMention() + "to do this!")).setEphemeral(true).queue();
                return;
            }
        }
    }
    UserContextCommand finalCommand = command;
    Runnable r = () -> {
        try {
            finalCommand.executeCommand(event);
            Metrics.COMMANDS.labels("success").inc();
        } catch (Exception e) {
            Metrics.COMMANDS.labels("failed").inc();
            LinkedDataObject translation = event.getGuild() == null ? LocaleLoader.getForLanguage("en_US") : LocaleLoader.ofGuild(event.getGuild());
            if (event.isAcknowledged())
                event.getHook().sendMessageEmbeds(EmbedUtil.errorEmbed(translation.getString("general.unknown_error_occured"))).setEphemeral(true).queue(s -> {
                }, ex -> {
                });
            else
                event.replyEmbeds(EmbedUtil.errorEmbed(translation.getString("general.unknown_error_occured"))).setEphemeral(true).queue(s -> {
                }, ex -> {
                });
            LOGGER.error("Could not execute user-context-menu-command", e);
            EmbedBuilder builder = new EmbedBuilder().setTitle("An error occurred while executing a user-context-command!").addField("Guild", event.getGuild() == null ? "None (Direct message)" : event.getGuild().getIdLong() + " (" + event.getGuild().getName() + ")", true).addField("Channel", event.getGuild() == null ? "None (Direct message)" : event.getChannel().getName(), true).addField("User", event.getUser().getAsMention() + " (" + event.getUser().getAsTag() + ")", true).addField("Command", event.getName(), false).setColor(EmbedUtil.ERROR_COLOR);
            event.getJDA().openPrivateChannelById(Bean.OWNER_ID).flatMap(c -> c.sendMessageEmbeds(builder.build()).content("```fix\n" + ExceptionUtils.getStackTrace(e) + "\n```")).queue();
        }
    };
    Bean.getInstance().getCommandExecutor().submit(r);
}
Also used : LocaleLoader(at.xirado.bean.translation.LocaleLoader) MessageContextInteractionEvent(net.dv8tion.jda.api.events.interaction.command.MessageContextInteractionEvent) Permission(net.dv8tion.jda.api.Permission) AudioManager(net.dv8tion.jda.api.managers.AudioManager) LoggerFactory(org.slf4j.LoggerFactory) Util(at.xirado.bean.misc.Util) Member(net.dv8tion.jda.api.entities.Member) Command(net.dv8tion.jda.api.interactions.commands.Command) ArrayList(java.util.ArrayList) at.xirado.bean.command.slashcommands.moderation(at.xirado.bean.command.slashcommands.moderation) UserContextInteractionEvent(net.dv8tion.jda.api.events.interaction.command.UserContextInteractionEvent) Guild(net.dv8tion.jda.api.entities.Guild) at.xirado.bean.command.slashcommands.music(at.xirado.bean.command.slashcommands.music) GuildVoiceState(net.dv8tion.jda.api.entities.GuildVoiceState) OptionMapping(net.dv8tion.jda.api.interactions.commands.OptionMapping) Map(java.util.Map) GenericCommand(at.xirado.bean.command.GenericCommand) SlashCommand(at.xirado.bean.command.SlashCommand) EmbedUtil(at.xirado.bean.misc.EmbedUtil) UserContextCommand(at.xirado.bean.command.context.UserContextCommand) MockContextMenuCommand(at.xirado.bean.command.context.message.MockContextMenuCommand) Logger(org.slf4j.Logger) at.xirado.bean.command.slashcommands(at.xirado.bean.command.slashcommands) GuildChannel(net.dv8tion.jda.api.entities.GuildChannel) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Metrics(at.xirado.bean.misc.Metrics) SlashCommandInteractionEvent(net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent) MessageContextCommand(at.xirado.bean.command.context.MessageContextCommand) CommandAutoCompleteInteractionEvent(net.dv8tion.jda.api.events.interaction.command.CommandAutoCompleteInteractionEvent) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) Consumer(java.util.function.Consumer) Nullable(org.jetbrains.annotations.Nullable) List(java.util.List) CommandFlag(at.xirado.bean.command.CommandFlag) at.xirado.bean.command.slashcommands.leveling(at.xirado.bean.command.slashcommands.leveling) SlashCommandContext(at.xirado.bean.command.SlashCommandContext) CommandListUpdateAction(net.dv8tion.jda.api.requests.restaction.CommandListUpdateAction) Bean(at.xirado.bean.Bean) NotNull(org.jetbrains.annotations.NotNull) Collections(java.util.Collections) SlapContextMenuCommand(at.xirado.bean.command.context.user.SlapContextMenuCommand) LinkedDataObject(at.xirado.bean.data.LinkedDataObject) ExceptionUtils(org.apache.commons.lang3.exception.ExceptionUtils) UserContextCommand(at.xirado.bean.command.context.UserContextCommand) LinkedDataObject(at.xirado.bean.data.LinkedDataObject) GuildVoiceState(net.dv8tion.jda.api.entities.GuildVoiceState) Guild(net.dv8tion.jda.api.entities.Guild) AudioManager(net.dv8tion.jda.api.managers.AudioManager) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) Permission(net.dv8tion.jda.api.Permission) Member(net.dv8tion.jda.api.entities.Member)

Aggregations

LinkedDataObject (at.xirado.bean.data.LinkedDataObject)6 EmbedBuilder (net.dv8tion.jda.api.EmbedBuilder)5 Bean (at.xirado.bean.Bean)4 SlashCommand (at.xirado.bean.command.SlashCommand)4 SlashCommandContext (at.xirado.bean.command.SlashCommandContext)4 EmbedUtil (at.xirado.bean.misc.EmbedUtil)4 Util (at.xirado.bean.misc.Util)4 Guild (net.dv8tion.jda.api.entities.Guild)4 SlashCommandInteractionEvent (net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent)4 NotNull (org.jetbrains.annotations.NotNull)4 CommandFlag (at.xirado.bean.command.CommandFlag)3 GenericCommand (at.xirado.bean.command.GenericCommand)3 MessageContextCommand (at.xirado.bean.command.context.MessageContextCommand)3 UserContextCommand (at.xirado.bean.command.context.UserContextCommand)3 MockContextMenuCommand (at.xirado.bean.command.context.message.MockContextMenuCommand)3 SlapContextMenuCommand (at.xirado.bean.command.context.user.SlapContextMenuCommand)3 at.xirado.bean.command.slashcommands (at.xirado.bean.command.slashcommands)3 at.xirado.bean.command.slashcommands.leveling (at.xirado.bean.command.slashcommands.leveling)3 at.xirado.bean.command.slashcommands.moderation (at.xirado.bean.command.slashcommands.moderation)3 at.xirado.bean.command.slashcommands.music (at.xirado.bean.command.slashcommands.music)3