Better Error Handling

This commit is contained in:
Daniel Odendahl Jr
2017-05-05 21:37:30 +00:00
parent d8a773958d
commit 13cbd23f2f
54 changed files with 120 additions and 156 deletions
+2 -3
View File
@@ -14,9 +14,8 @@ module.exports = class ZalgoCommand extends Command {
prompt: 'What text would you like to convert to zalgo?',
type: 'string',
validate: text => {
if(text.length < 500)
return true;
return `Please keep your text under 500 characters, you have ${text.length}.`;
if(text.length < 500) return true;
return 'Invalid Text. Text must be under 500 characters.';
},
parse: text => zalgo(text)
}