Default enum values for STScript boolean argument

This commit is contained in:
Wolfsblvt
2024-06-16 03:14:43 +02:00
parent 51d7ba728f
commit 34e8cf476a

View File

@ -78,6 +78,9 @@ export class SlashCommandArgument {
});
this.enumProvider = enumProvider;
this.forceEnum = forceEnum;
// If no enums were set explictly and the type is one where we know possible enum values, we set them here
if (!this.enumList.length && types == ARGUMENT_TYPE.BOOLEAN) this.enumList = [new SlashCommandEnumValue('true'), new SlashCommandEnumValue('false')];
}
}