A variety of fixes and a change in the way errors are handled.

This commit is contained in:
Daniel Odendahl Jr
2017-04-25 17:37:01 +00:00
parent d3dad31c6d
commit 49d092d7c1
51 changed files with 117 additions and 108 deletions
+2 -2
View File
@@ -21,9 +21,9 @@ module.exports = class MathCommand extends Command {
try {
const solved = math.eval(expression);
return message.say(solved)
.catch(() => message.say(':x: Error! Invalid statement!'));
.catch(() => message.say('Invalid statement.'));
} catch (err) {
return message.say(':x: Error! Invalid statement!');
return message.say('Invalid statement.');
}
}
};