chore(release): v2.6.2

This commit is contained in:
March 7th
2022-08-18 12:11:49 +07:00
parent 8082ade700
commit b870b51c11
3 changed files with 8 additions and 4 deletions

View File

@@ -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 || 0;
for (let i = 0; i < options.length; i++) {
const optionInput = subCommand.options[i];
const value = options[i];
@@ -905,7 +905,7 @@ class ApplicationCommand extends Base {
// length = 2 => sub command group + sub command
switch (subCommandArray.length) {
case 0: {
const valueRequired = this.options.filter(o => o.required).length;
const valueRequired = this.options?.filter(o => o.required).length || 0;
for (let i = 0; i < options.length; i++) {
const optionInput = this.options[i];
const value = options[i];