This commit is contained in:
Daniel Odendahl Jr
2017-04-30 22:56:59 +00:00
parent 83e990ae1c
commit 877f720cfc
105 changed files with 460 additions and 461 deletions
+4 -4
View File
@@ -16,14 +16,14 @@ module.exports = class MathCommand extends Command {
});
}
run(message, args) {
run(msg, args) {
const { expression } = args;
try {
const solved = math.eval(expression);
return message.say(solved)
.catch(() => message.say('Invalid statement.'));
return msg.say(solved)
.catch(() => msg.say('Invalid statement.'));
} catch (err) {
return message.say('Invalid statement.');
return msg.say('Invalid statement.');
}
}
};