src/Core/Stores/CommandRegistry.js
/**
     * Resolves the command Object. Only resolves the command if it's not globally disabled.
     * Doesn't resolve the command if the command is guild disabled.
     *
     * @param {String} label - The command label/ command alias
     * @param {Array<String>} args - Array of arguments
     * @param {GuildConfig} [guildConfig=null] - GuildConfig
     * @returns {Command|null} The command object or null if the command doesn't exist or is not enabled
     * @memberof CommandRegistry
     */
Resolves the command Object. Only resolves the command if it's not globally disabled.
Doesn't resolve the command if the command is guild disabled.


Resolves the command Object . Only resolves the command if it ' s not globally disabled . Doesn ' t resolve the command if the command is guild disabled .
resolve(label, args, guildConfig = null) {
        label = this.aliases.get(label);
        if (!label) {
            return null;
        }
        const command = this.registry.get(label);
        if (!command || !command.module.enabled || !command.enabled) {
            return null;
        }
        if (guildConfig
            && (
                (guildConfig.isModuleDisabled(command.module) && !command.module.serverBypass) 
                || (guildConfig.isCommandDisabled(command) && !command.serverBypass) 
            )
        ) {
            return null;
        }
        if (command.hasSubcmd) {
            const sub = command.subCommands.resolve(args[0], args.slice(1) );
            if (sub) {
                args.shift();
            }
            return sub || command;
        }
        return command;
    }
resolve ( label , args , guildConfig = null ) { label = this . aliases . get ( label ) ; if ( ! label ) { return null ; } const command = this . registry . get ( label ) ; if ( ! command || ! command . module . enabled || ! command . enabled ) { return null ; } if ( guildConfig && ( ( guildConfig . isModuleDisabled ( command . module ) && ! command . module . serverBypass ) || ( guildConfig . isCommandDisabled ( command ) && ! command . serverBypass ) ) ) { return null ; } if ( command . hasSubcmd ) { const sub = command . subCommands . resolve ( args [ 0 ] , args . slice ( 1 ) ) ; if ( sub ) { args . shift ( ) ; } return sub || command ; } return command ; }
Resolves the command Object.
Resolves the command Object .
// not existing / global disable // server disable // module server-disabled // command server-disabled