mirror of
https://github.com/discordeno/discordeno.git
synced 2026-05-29 15:00:07 +00:00
* Update Template and Add Discordeno.js notes in favour of depreciating Discord Structures * Add package.json * deno fmt Co-authored-by: meister03 <meisterpi@gmail.com> Co-authored-by: LTS20050703 <87189679+lts20050703@users.noreply.github.com> Co-authored-by: LTS20050703 <lts20050703@gmail.com>
18 lines
720 B
JavaScript
18 lines
720 B
JavaScript
const UtilCommand = require("./CommandResponse.js");
|
|
const Message = require("./Message.js");
|
|
const Interaction = require("./Interaction.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;
|