TravBot-v3/src/Structures/Event.js

16 lines
430 B
JavaScript

/* eslint-disable no-unused-vars */
module.exports = class Event {
constructor(client, name, options = {}) {
this.name = name;
this.client = client;
this.type = options.once ? 'once' : 'on';
this.emitter = (typeof options.emitter === 'string' ? this.client[options.emitter] : options.emitter) || this.client;
}
async run(...args) {
throw new Error(`The run method has not been implemented in ${this.name}`);
}
};