mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 14:19:56 +02:00
Fix
This commit is contained in:
@@ -30,7 +30,7 @@ module.exports = class MathCommand extends Command {
|
|||||||
run(msg, { expression }) {
|
run(msg, { expression }) {
|
||||||
try {
|
try {
|
||||||
const evaluated = math.evaluate(expression);
|
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());
|
return msg.reply(evaluated.toString());
|
||||||
} catch {
|
} catch {
|
||||||
return msg.reply('Invalid expression.');
|
return msg.reply('Invalid expression.');
|
||||||
|
|||||||
Reference in New Issue
Block a user