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
@@ -20,9 +20,8 @@ module.exports = class BinaryCommand extends Command {
prompt: 'What text would you like to convert to binary?',
type: 'string',
validate: text => {
if(binary(text).length < 2000)
return true;
return 'Your message content is too long.';
if(binary(text).length < 2000) return true;
return 'Your text is too long.';
},
parse: text => binary(text)
}