helper fixes
This commit is contained in:
parent
dd941193f6
commit
08e7eaea73
@ -153,11 +153,19 @@ class InteractionWrapper {
|
|||||||
|
|
||||||
get subcommand() {
|
get subcommand() {
|
||||||
const [data] = this.options.data;
|
const [data] = this.options.data;
|
||||||
if (data.type === 'SUB_COMMAND') return data;
|
if (!data) return null;
|
||||||
|
else if (data.type === 'SUB_COMMAND') return data;
|
||||||
else if (data.type === 'SUB_COMMAND_GROUP') return data.options[0];
|
else if (data.type === 'SUB_COMMAND_GROUP') return data.options[0];
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get subcommandGroup() {
|
||||||
|
const [data] = this.options.data;
|
||||||
|
if (!data) return null;
|
||||||
|
else if (data.type === 'SUB_COMMAND_GROUP') return data;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Recursively gets the actual subcommands
|
* Recursively gets the actual subcommands
|
||||||
* @private
|
* @private
|
||||||
|
Loading…
Reference in New Issue
Block a user