Cleaner Looking args

This commit is contained in:
Daniel Odendahl Jr
2017-05-02 17:54:07 +00:00
parent 57ee7fa82b
commit 3bb21c2df0
83 changed files with 787 additions and 616 deletions
+13 -11
View File
@@ -9,17 +9,19 @@ module.exports = class TypingGameCommand extends Command {
group: 'games',
memberName: 'typinggame',
description: 'See how fast you can type a sentence in a given time limit.',
args: [{
key: 'difficulty',
prompt: 'What should the difficulty of the typing game be? `Easy`, `Medium`, `Hard`, `Extreme`, or `Impossible`?',
type: 'string',
validate: difficulty => {
if (['easy', 'medium', 'hard', 'extreme', 'impossible'].includes(difficulty.toLowerCase()))
return true;
return 'Please set the difficulty to either `easy`, `medium`, `hard`, `extreme`, or `impossible`.';
},
parse: difficulty => difficulty.toLowerCase()
}]
args: [
{
key: 'difficulty',
prompt: 'What should the difficulty of the typing game be? `Easy`, `Medium`, `Hard`, `Extreme`, or `Impossible`?',
type: 'string',
validate: difficulty => {
if (['easy', 'medium', 'hard', 'extreme', 'impossible'].includes(difficulty.toLowerCase()))
return true;
return 'Please set the difficulty to either `easy`, `medium`, `hard`, `extreme`, or `impossible`.';
},
parse: difficulty => difficulty.toLowerCase()
}
]
});
}