modmail/structure/Command.js
2021-10-22 10:35:04 +03:00

21 lines
390 B
JavaScript

class Command {
constructor (client, options) {
Object.entries(options).forEach(([ key, val ]) => {
this[key] = val;
});
if (!this.name) throw new Error(`Missing name for command`);
this.client = client;
}
async execute () {
throw new Error(`Missing execute in ${this.name}`);
}
}
module.exports = Command;