modmail/structure/Command.js
2021-06-18 16:41:57 +03:00

21 lines
386 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;