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 MorseCommand extends Command {
group: 'textedit',
memberName: 'morse',
description: 'Translates text to morse code.',
args: [{
key: 'text',
prompt: 'What text would you like to convert to morse?',
type: 'string',
validate: text => {
if (letterTrans(text, dictionary, ' ').length < 1999)
return true;
return 'Your message content is too long.';
},
parse: text => letterTrans(text.toLowerCase(), dictionary, ' ')
}]
args: [
{
key: 'text',
prompt: 'What text would you like to convert to morse?',
type: 'string',
validate: text => {
if (letterTrans(text, dictionary, ' ').length < 1999)
return true;
return 'Your message content is too long.';
},
parse: text => letterTrans(text.toLowerCase(), dictionary, ' ')
}
]
});
}