Disable : in mathjs

This commit is contained in:
Dragon Fire
2021-05-14 09:58:49 -04:00
parent 165ccbb31b
commit fd84f0e985
+1
View File
@@ -38,6 +38,7 @@ module.exports = class MathCommand extends Command {
run(msg, { expression }) {
try {
if (expression.includes(':')) return msg.reply('Invalid expression.');
const evaluated = limitedEvaluate(expression);
if (typeof evaluated === 'function') return msg.reply('Invalid expression.');
return msg.reply(evaluated.toString());