helper fixes
This commit is contained in:
parent
dd941193f6
commit
08e7eaea73
@ -153,11 +153,19 @@ class InteractionWrapper {
|
||||
|
||||
get subcommand() {
|
||||
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];
|
||||
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
|
||||
* @private
|
||||
|
Loading…
Reference in New Issue
Block a user