mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Disable : in mathjs
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user