mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 22:34:46 +02:00
Cleaner Looking args
This commit is contained in:
@@ -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()
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user