wrapper stuff
This commit is contained in:
parent
dfa21a5aad
commit
15c432d739
@ -42,7 +42,7 @@ class GuildWrapper {
|
|||||||
try {
|
try {
|
||||||
await this.client.storageManager.mongodb.guilds.updateOne({
|
await this.client.storageManager.mongodb.guilds.updateOne({
|
||||||
guildId: this.id
|
guildId: this.id
|
||||||
}, settings);
|
}, { _version: '3.slash', ...settings });
|
||||||
this._settings = {
|
this._settings = {
|
||||||
...this._settings,
|
...this._settings,
|
||||||
...settings
|
...settings
|
||||||
|
@ -51,6 +51,10 @@ class InvokerWrapper {
|
|||||||
return this.target.subcommand;
|
return this.target.subcommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get subcommandGroup() {
|
||||||
|
return this.target.subcommandGroup;
|
||||||
|
}
|
||||||
|
|
||||||
inGuild() {
|
inGuild() {
|
||||||
return Boolean(this.target.guildId);
|
return Boolean(this.target.guildId);
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,8 @@ class MessageWrapper {
|
|||||||
this.message = message;
|
this.message = message;
|
||||||
|
|
||||||
this._reply = null;
|
this._reply = null;
|
||||||
|
this._subcommand = null;
|
||||||
|
this._subcommandGroup = null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,6 +50,22 @@ class MessageWrapper {
|
|||||||
return this.guild ? this.guild.prefix : this.client.getUserWrapper(this.author.id, false).prefix;
|
return this.guild ? this.guild.prefix : this.client.getUserWrapper(this.author.id, false).prefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get subcommand() {
|
||||||
|
return this._subcommand || null;
|
||||||
|
}
|
||||||
|
|
||||||
|
set subcommand(cmd) {
|
||||||
|
this._subcommand = cmd;
|
||||||
|
}
|
||||||
|
|
||||||
|
get subcommandGroup() {
|
||||||
|
return this._subcommandGroup || null;
|
||||||
|
}
|
||||||
|
|
||||||
|
set subcommandGroup(grp) {
|
||||||
|
this._subcommandGroup = grp;
|
||||||
|
}
|
||||||
|
|
||||||
deferReply() {
|
deferReply() {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user