Minor Error Catching Modifications

This commit is contained in:
Daniel Odendahl Jr
2017-04-11 14:10:39 +00:00
parent 0e6060f4f5
commit b0ff08a405
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ module.exports = class MathCommand extends Command {
const expression = args.expression;
try {
const solved = math.eval(expression);
return message.say(solved).catch(err => message.say(':x: Error! Invalid statement!'));
return message.say(solved).catch(() => message.say(':x: Error! Invalid statement!'));
}
catch (err) {
return message.say(':x: Error! Invalid statement!');
+1 -1
View File
@@ -26,6 +26,6 @@ module.exports = class CowsayCommand extends Command {
text: turnToCowsay,
e: 'oO',
T: 'U '
})).catch(error => message.say(':x: Error! Perhaps the content is too long?'));
})).catch(() => message.say(':x: Error! Perhaps the content is too long?'));
}
};