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];