Files
discordeno/examples/nodejs/Structures/BaseCommand.js
Jonathan Ho d04a040f28 Setup turborepo (#2610)
* chore: BREAKING move to monorepo structure

* chore: setup turborepo
2022-12-01 01:59:02 +08:00

16 lines
630 B
JavaScript

const UtilCommand = require("./CommandResponse.js");
class BaseCommand extends UtilCommand {
constructor(data) {
super(data);
this.message = data.message;
this.interaction = data.interaction;
this.user = this.message ? this.message.author : this.interaction.user;
this.guild = this.message ? this.message.guild : this.interaction.guild;
this.member = this.message ? this.message.member : this.interaction.member;
this.channel = this.message ? this.message.channel : this.interaction.channel;
this.client = data.client;
this.settings = data.settings ?? {};
}
}
module.exports = BaseCommand;