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
+1 -2
View File
@@ -14,8 +14,7 @@ module.exports = class ClearSettingCommand extends Command {
prompt: 'What setting do you want to clear? `modLog`, `memberLog`, `staffRole`, or `singleRole`?',
type: 'string',
validate: setting => {
if(['modLog', 'memberLog', 'staffRole', 'singleRole'].includes(setting))
return true;
if(['modLog', 'memberLog', 'staffRole', 'singleRole'].includes(setting)) return true;
return 'Please enter either `modLog`, `memberLog`, `staffRole`, or `singleRole`.';
}
}