mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 22:01:54 +02:00
choice argument type
This commit is contained in:
@@ -14,12 +14,8 @@ module.exports = class BinaryCommand extends Command {
|
||||
{
|
||||
key: 'mode',
|
||||
prompt: `Would you like to ${list(modes, 'or')}?`,
|
||||
type: 'string',
|
||||
validate: mode => {
|
||||
if (modes.includes(mode.toLowerCase())) return true;
|
||||
return `Invalid mode, please enter either ${list(modes, 'or')}.`;
|
||||
},
|
||||
parse: mode => mode.toLowerCase()
|
||||
type: 'choice',
|
||||
choices: modes
|
||||
},
|
||||
{
|
||||
key: 'text',
|
||||
|
||||
Reference in New Issue
Block a user