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
+2 -2
View File
@@ -19,10 +19,10 @@ module.exports = class WarnCommand extends Command {
prompt: 'What do you want to set the reason as?',
type: 'string',
validate: reason => {
if (reason.length < 141) {
if (reason.length < 140) {
return true;
}
return 'Please keep your reason under 140 characters.';
return `Please keep your reason under 140 characters, you have ${reason.length}.`;
}
}]
});