Merge pull request #339 from xD33m/patch-1

Fix slashCommand of type SUB_COMMAND_GROUP
This commit is contained in:
Cinnamon
2022-10-07 12:00:33 +07:00
committed by GitHub

View File

@@ -697,7 +697,7 @@ class ApplicationCommand extends Base {
const subGroup = this.options.find(
o => o.name == subCommandArray[0] && o.type == 'SUB_COMMAND_GROUP',
);
const subCommand = this.options.find(o => o.name == subCommandArray[1] && o.type == 'SUB_COMMAND');
const subCommand = subGroup.options.find(o => o.name == subCommandArray[1] && o.type == 'SUB_COMMAND');
optionsBuild = [
{
type: ApplicationCommandOptionTypes[subGroup.type],