mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
?
This commit is contained in:
@@ -7,6 +7,7 @@ class ChoiceArgumentType extends ArgumentType {
|
||||
}
|
||||
|
||||
validate(value, msg, arg) {
|
||||
console.log(arg, arg.choices);
|
||||
if (arg.choices.includes(value.toLowerCase())) return true;
|
||||
return `Invalid ${arg.label}, please enter either ${list(arg.choices, 'or')}.`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user