src/Core/Loaders/CommandLoader.js
/**
     * Init and construct/instance all subcommands of the given parent command
     *
     * @param {Command} parentCommand - The command Object
     * @param {Array<new (...args[]: any) => Command>} subCommands - Array of Command class to load (non instantiated)
     * @returns {Boolean} - Whether it loaded the subcommands or not
     * @memberof Command
     */
Init and construct/instance all subcommands of the given parent command
@param {Command} parentCommand - The command Object
@param {Array Command>} subCommands - Array of Command class to load (non instantiated)
@returns {Boolean} - Whether it loaded the subcommands or not
@memberof Command
Init and construct / instance all subcommands of the given parent command @param { Command } parentCommand - The command Object @param { Array Command > } subCommands - Array of Command class to load ( non instantiated ) @returns { Boolean } - Whether it loaded the subcommands or not @memberof Command
loadSubCommands(parentCommand, subCommands) {
        if (!parentCommand.subCommands || !subCommands.length) {
            this.logger.error(`[Module(${this._module.label})] Command: ${parentCommand.fullLabel} - Couldn't init subcommands.`);
            return false;
        }
        for (const Value of Object.values(subCommands) ) {
            const subCommand = new Value(this._module);
            try {
                this.load(subCommand, parentCommand.subCommands);
                subCommand.parentCommand = parentCommand;
            } catch (err) {
                this.logger.error(err);
            }
        }
        return true;
    }
loadSubCommands ( parentCommand , subCommands ) { if ( ! parentCommand . subCommands || ! subCommands . length ) { this . logger . error ( ` ${ this . _module . label } ${ parentCommand . fullLabel } ` ) ; return false ; } for ( const Value of Object . values ( subCommands ) ) { const subCommand = new Value ( this . _module ) ; try { this . load ( subCommand , parentCommand . subCommands ) ; subCommand . parentCommand = parentCommand ; } catch ( err ) { this . logger . error ( err ) ; } } return true ; }
Init and construct/instance all subcommands of the given parent command
 @param {Command} parentCommand - The command Object
 @param {Array<new (...args[]: any) => Command>} subCommands - Array of Command class to load (non instantiated)
 @returns {Boolean} - Whether it loaded the subcommands or not
 @memberof Command
Init and construct / instance all subcommands of the given parent command @param { Command } parentCommand - The command Object @param { Array<new ( ... args [] : any ) = > Command > } subCommands - Array of Command class to load ( non instantiated ) @returns { Boolean } - Whether it loaded the subcommands or not @memberof Command
/* No subCommands */