From 80278d3e0d4f7d02ad3ca2828cf3f0a306b6987c Mon Sep 17 00:00:00 2001 From: Adam Chubbuck Date: Wed, 17 Aug 2022 21:26:25 -0400 Subject: [PATCH] Adds support for slash commands with no options --- 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 0166fe9..3ad3212 100644 --- a/src/structures/ApplicationCommand.js +++ b/src/structures/ApplicationCommand.js @@ -738,7 +738,7 @@ class ApplicationCommand extends Base { 'is not a valid sub command', ); } - const valueRequired = subCommand.options.filter(o => o.required).length; + const valueRequired = subCommand.options?.filter(o => o.required).length; for (let i = 0; i < options.length; i++) { const optionInput = subCommand.options[i]; const value = options[i];