This commit is contained in:
Daniel Odendahl Jr
2018-03-23 22:35:21 +00:00
parent 9b8cc68b97
commit 0702a2d459
15 changed files with 48 additions and 96 deletions
+1 -4
View File
@@ -25,10 +25,7 @@ module.exports = class TypingTestCommand extends Command {
key: 'difficulty',
prompt: `What should the difficulty of the game be? Either ${list(difficulties, 'or')}.`,
type: 'string',
validate: difficulty => {
if (difficulties.includes(difficulty.toLowerCase())) return true;
return `Invalid difficulty, please enter either ${list(difficulties, 'or')}.`;
},
oneOf: difficulties,
parse: difficulty => difficulty.toLowerCase()
}
]