mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 21:44:48 +02:00
@@ -24,8 +24,12 @@ module.exports = class TypingTestCommand extends Command {
|
||||
{
|
||||
key: 'difficulty',
|
||||
prompt: `What should the difficulty of the game be? Either ${list(difficulties, 'or')}.`,
|
||||
type: 'choice',
|
||||
choices: difficulties
|
||||
type: 'string',
|
||||
validate: difficulty => {
|
||||
if (difficulties.includes(difficulty.toLowerCase())) return true;
|
||||
return `Invalid difficulty, please enter either ${list(difficulties, 'or')}.`;
|
||||
},
|
||||
parse: difficulty => difficulty.toLowerCase()
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user