This commit is contained in:
Daniel Odendahl Jr
2017-06-01 08:44:02 +00:00
parent 7802bb49cb
commit 14f85f94bd
129 changed files with 1915 additions and 1720 deletions
+3 -3
View File
@@ -21,10 +21,10 @@ module.exports = class MathCommand extends Command {
run(msg, args) {
const { expression } = args;
try {
const solved = math.eval(expression);
return msg.say(solved).catch(() => msg.say('Invalid Statement.'));
const solved = math.eval(expression).toString();
return msg.say(solved);
} catch (err) {
return msg.say('Invalid Statement.');
return msg.say('Invalid Statement');
}
}
};