This commit is contained in:
Dragon Fire
2021-05-03 17:16:03 -04:00
parent 50a729bc6f
commit 3abc8b7362
+1 -1
View File
@@ -30,7 +30,7 @@ module.exports = class MathCommand extends Command {
run(msg, { expression }) {
try {
const evaluated = math.evaluate(expression);
if (typeof result === 'function') return msg.reply('Invalid expression.');
if (typeof evaluated === 'function') return msg.reply('Invalid expression.');
return msg.reply(evaluated.toString());
} catch {
return msg.reply('Invalid expression.');