structures/bot/Loader.js
/**
   * UNLOAD COMMAND
   *
   * Used to simplify unloads commands from multiple locations
   * @param {String} cmdPath
   * @param {String} cmdName
   */
UNLOAD COMMAND
Used to simplify unloads commands from multiple locations
@param {String} cmdPath
@param {String} cmdName
UNLOAD COMMAND Used to simplify unloads commands from multiple locations @param { String } cmdPath @param { String } cmdName
async unloadCommand(cmdPath, cmdName) {
    let command;
    if (this.client.commands.has(cmdName)) {
      command = this.client.commands.get(cmdName);
    } else if (this.client.aliases.has(cmdName)) {
      command = this.client.commands.get(this.client.aliases.get(cmdName));
    } else {
      return `The command '${cmdName}' doesn't exist, it's not an alias either.`;
    }
    if (command.shutdown) {
      await command.shutdown(this.client);
    }
    delete require.cache[require.resolve(path.resolve(cmdPath, command.conf.fileName))];
    return false;
  }
async unloadCommand ( cmdPath , cmdName ) { let command ; if ( this . client . commands . has ( cmdName ) ) { command = this . client . commands . get ( cmdName ) ; } else if ( this . client . aliases . has ( cmdName ) ) { command = this . client . commands . get ( this . client . aliases . get ( cmdName ) ) ; } else { return ` ${ cmdName } ` ; } if ( command . shutdown ) { await command . shutdown ( this . client ) ; } delete require . cache [ require . resolve ( path . resolve ( cmdPath , command . conf . fileName ) ) ] ; return false ; }
UNLOAD COMMAND
 Used to simplify unloads commands from multiple locations
 @param {String} cmdPath
 @param {String} cmdName
UNLOAD COMMAND Used to simplify unloads commands from multiple locations @param { String } cmdPath @param { String } cmdName