structures/bot/Loader.js
/**
   * LOAD EVENT
   *
   * Used to simplify loading events from multiple locations
   * @param {String} evtPath
   * @param {String} evtName
   */
LOAD EVENT
Used to simplify loading events from multiple locations
@param {String} evtPath
@param {String} evtName
LOAD EVENT Used to simplify loading events from multiple locations @param { String } evtPath @param { String } evtName
loadEvent(evtPath, evtName) {
    try {
      const props = new (require(path.resolve(evtPath, evtName)))(this.client);
      if (props.conf.enabled === false) return;
      props.conf.location = evtPath;
      props.conf.fileName = evtName;
      props.conf.name = evtName.replace(/\..+$/,'')
      if (props.init) {
        props.init(this.client);
      }
      this.client.events.set(props.conf.name, props);
      if(props.conf.ws) this.client.ws.on(props.conf.name, (...args) => props.run(this.client, ...args));
      else this.client.on(props.conf.name, (...args) => props.run(this.client, ...args));
      console.log(`Loading event ${props.conf.name}`);
      return false;
    } catch (error) {
      return `Unable to load event ${evtName}: ${error.message}`;
    }
  }
loadEvent ( evtPath , evtName ) { try { const props = new ( require ( path . resolve ( evtPath , evtName ) ) ) ( this . client ) ; if ( props . conf . enabled === false ) return ; props . conf . location = evtPath ; props . conf . fileName = evtName ; props . conf . name = evtName . replace ( / \..+$ / , '' ) if ( props . init ) { props . init ( this . client ) ; } this . client . events . set ( props . conf . name , props ) ; if ( props . conf . ws ) this . client . ws . on ( props . conf . name , ( ... args ) => props . run ( this . client , ... args ) ) ; else this . client . on ( props . conf . name , ( ... args ) => props . run ( this . client , ... args ) ) ; console . log ( ` ${ props . conf . name } ` ) ; return false ; } catch ( error ) { return ` ${ evtName } ${ error . message } ` ; } }
LOAD EVENT
 Used to simplify loading events from multiple locations
 @param {String} evtPath
 @param {String} evtName
LOAD EVENT Used to simplify loading events from multiple locations @param { String } evtPath @param { String } evtName