private void processCommands(GuildMessageReceivedEvent event, GuildData guildData, String trigger, String[] args, boolean isMention) {
        ICommandMain cmd = CascadeBot.INS.getCommandManager().getCommand(trigger, event.getAuthor(), guildData);
        if (cmd != null) {
            if (cmd.getModule().isPublicModule() &&
                    !guildData.isModuleEnabled(cmd.getModule())) {
                if (guildData.getSettings().willDisplayModuleErrors() || Environment.isDevelopment()) {
                    EmbedBuilder builder = MessagingObjects.getClearThreadLocalEmbedBuilder();
                    builder.setDescription(String.format("The module `%s` for command `%s` is disabled!", cmd.getModule().toString(), trigger));
                    builder.setTimestamp(Instant.now());
                    builder.setFooter("Requested by " + event.getAuthor().getAsTag(), event.getAuthor().getEffectiveAvatarUrl());
                    Messaging.sendDangerMessage(event.getChannel(), builder, guildData.getSettings().useEmbedForMessages());
                }
                // TODO: Modlog?
                return;
            }
            CommandContext context = new CommandContext(
                    event.getJDA(),
                    event.getChannel(),
                    event.getMessage(),
                    event.getGuild(),
                    guildData,
                    args,
                    event.getMember(),
                    trigger,
                    isMention
            );
            if (args.length >= 1) {
                if (processSubCommands(cmd, args, context)) {
                    return;
                }
            }
            dispatchCommand(cmd, context);
        }
    }
private void processCommands(GuildMessageReceivedEvent event, GuildData guildData, String trigger, String[] args, boolean isMention) {
        ICommandMain cmd = CascadeBot.INS.getCommandManager().getCommand(trigger, event.getAuthor(), guildData);
        if (cmd != null) {
            if (cmd.getModule().isPublicModule() &&
                    !guildData.isModuleEnabled(cmd.getModule())) {
                if (guildData.getSettings().willDisplayModuleErrors() || Environment.isDevelopment()) {
                    EmbedBuilder builder = MessagingObjects.getClearThreadLocalEmbedBuilder();
                    builder.setDescription(String.format("The module `%s` for command `%s` is disabled!", cmd.getModule().toString(), trigger));
                    builder.setTimestamp(Instant.now());
                    builder.setFooter("Requested by " + event.getAuthor().getAsTag(), event.getAuthor().getEffectiveAvatarUrl());
                    Messaging.sendDangerMessage(event.getChannel(), builder, guildData.getSettings().useEmbedForMessages());
                }
               
                return;
            }
            CommandContext context = new CommandContext(
                    event.getJDA(),
                    event.getChannel(),
                    event.getMessage(),
                    event.getGuild(),
                    guildData,
                    args,
                    event.getMember(),
                    trigger,
                    isMention
            );
            if (args.length >= 1) {
                if (processSubCommands(cmd, args, context)) {
                    return;
                }
            }
            dispatchCommand(cmd, context);
        }
    }
private void processcommands(guildmessagereceivedevent event, guilddata guilddata, string trigger, string[] args, boolean ismention) { icommandmain cmd = cascadebot.ins.getcommandmanager().getcommand(trigger, event.getauthor(), guilddata); if (cmd != null) { if (cmd.getmodule().ispublicmodule() && !guilddata.ismoduleenabled(cmd.getmodule())) { if (guilddata.getsettings().willdisplaymoduleerrors() || environment.isdevelopment()) { embedbuilder builder = messagingobjects.getclearthreadlocalembedbuilder(); builder.setdescription(string.format("the module `%s` for command `%s` is disabled!", cmd.getmodule().tostring(), trigger)); builder.settimestamp(instant.now()); builder.setfooter("requested by " + event.getauthor().getastag(), event.getauthor().geteffectiveavatarurl()); messaging.senddangermessage(event.getchannel(), builder, guilddata.getsettings().useembedformessages()); } return; } commandcontext context = new commandcontext( event.getjda(), event.getchannel(), event.getmessage(), event.getguild(), guilddata, args, event.getmember(), trigger, ismention ); if (args.length >= 1) { if (processsubcommands(cmd, args, context)) { return; } } dispatchcommand(cmd, context); } }