mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-13 08:19:08 +02:00
choice argument type
This commit is contained in:
@@ -15,12 +15,8 @@ module.exports = class Base64Command 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