mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 21:40:49 +02:00
22.0.0
This commit is contained in:
@@ -21,10 +21,10 @@ module.exports = class MathCommand extends Command {
|
||||
run(msg, args) {
|
||||
const { expression } = args;
|
||||
try {
|
||||
const solved = math.eval(expression);
|
||||
return msg.say(solved).catch(() => msg.say('Invalid Statement.'));
|
||||
const solved = math.eval(expression).toString();
|
||||
return msg.say(solved);
|
||||
} catch (err) {
|
||||
return msg.say('Invalid Statement.');
|
||||
return msg.say('Invalid Statement');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user