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
@@ -19,9 +19,8 @@ module.exports = class PruneCommand extends Command {
prompt: 'How many messages do you want to delete? Limit of up to 99.',
type: 'integer',
validate: count => {
if(count < 100 && count > 0)
return true;
return `${count} is not a valid amount of messages. Limit 1-99.`;
if(count < 100 && count > 0) return true;
return 'Invalid Count. Count must be from 1-99.';
}
}
]