structures/bot/Loader.js
/**
   * LOAD COMMAND
   *
   * Used to simplify loading commands from multiple locations
   * @param {String} cmdPath
   * @param {String} cmdName
   */
LOAD COMMAND
Used to simplify loading commands from multiple locations
@param {String} cmdPath
@param {String} cmdName
LOAD COMMAND Used to simplify loading commands from multiple locations @param { String } cmdPath @param { String } cmdName
loadCommand(cmdPath, cmdName) {
    try {
      const props = new (require(path.resolve(cmdPath, cmdName)))(this.client);
      if (!props.enabled) return;
      props.location = cmdPath;
      props.fileName = cmdName;
      props.commandData.name = cmdName.replace(/\..+$/,'')
      if (props.init) props.init(this.client);
      this.client.commands.set(props.commandData.name, props);
      console.log(`Loading command ${props.commandData.name}`);
      return false;
    } catch (error) {
      return `Unable to load command ${cmdName}: ${error.message}`;
    }
  }
loadCommand ( cmdPath , cmdName ) { try { const props = new ( require ( path . resolve ( cmdPath , cmdName ) ) ) ( this . client ) ; if ( ! props . enabled ) return ; props . location = cmdPath ; props . fileName = cmdName ; props . commandData . name = cmdName . replace ( / \..+$ / , '' ) if ( props . init ) props . init ( this . client ) ; this . client . commands . set ( props . commandData . name , props ) ; console . log ( ` ${ props . commandData . name } ` ) ; return false ; } catch ( error ) { return ` ${ cmdName } ${ error . message } ` ; } }
LOAD COMMAND
 Used to simplify loading commands from multiple locations
 @param {String} cmdPath
 @param {String} cmdName
LOAD COMMAND Used to simplify loading commands from multiple locations @param { String } cmdPath @param { String } cmdName
// props.aliases.forEach((alias) => { //   this.client.aliases.set(alias, props.help.name); // });