From 68bdf3141cb4a12a52fc0bff8b7ea9798eb0f02a Mon Sep 17 00:00:00 2001 From: muchnameless Date: Mon, 14 Jun 2021 00:10:29 +0200 Subject: [PATCH 1/2] (ApplicationCommand): default option.required --- src/structures/ApplicationCommand.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/ApplicationCommand.js b/src/structures/ApplicationCommand.js index 483a595a407e..ab9ed7418ab7 100644 --- a/src/structures/ApplicationCommand.js +++ b/src/structures/ApplicationCommand.js @@ -216,7 +216,7 @@ class ApplicationCommand extends Base { name: option.name, description: option.description, required: - option.required ?? (stringType === 'SUB_COMMAND' || stringType === 'SUB_COMMAND_GROUP') ? undefined : false, + option.required ?? ((stringType === 'SUB_COMMAND' || stringType === 'SUB_COMMAND_GROUP') ? undefined : false), choices: option.choices, options: option.options?.map(o => this.transformOption(o, received)), }; From 9e182b0db7e624f642a44ec480902dd3b2823a25 Mon Sep 17 00:00:00 2001 From: muchnameless Date: Mon, 14 Jun 2021 00:15:10 +0200 Subject: [PATCH 2/2] fix: lint --- src/structures/ApplicationCommand.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/ApplicationCommand.js b/src/structures/ApplicationCommand.js index ab9ed7418ab7..43ec79a99ff2 100644 --- a/src/structures/ApplicationCommand.js +++ b/src/structures/ApplicationCommand.js @@ -216,7 +216,7 @@ class ApplicationCommand extends Base { name: option.name, description: option.description, required: - option.required ?? ((stringType === 'SUB_COMMAND' || stringType === 'SUB_COMMAND_GROUP') ? undefined : false), + option.required ?? (stringType === 'SUB_COMMAND' || stringType === 'SUB_COMMAND_GROUP' ? undefined : false), choices: option.choices, options: option.options?.map(o => this.transformOption(o, received)), };