Better Validators and More Destucturing

This commit is contained in:
Daniel Odendahl Jr
2017-04-19 18:55:26 +00:00
parent c064401b37
commit d77f71b66a
40 changed files with 114 additions and 124 deletions
+3 -3
View File
@@ -14,10 +14,10 @@ module.exports = class ZalgoCommand extends Command {
prompt: 'What text would you like to convert to zalgo?',
type: 'string',
validate: content => {
if (zalgo(content).length > 1950) {
return 'Your message content is too long.';
if (content.length > 500) {
return true;
}
return true;
return `Please keep your text under 500 characters, you have ${content.length}.`;
},
parse: text => {
return zalgo(text);