mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-19 05:51:42 +02:00
Clean-Ups
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const Command = require('../../structures/Command');
|
||||
const math = require('mathjs');
|
||||
|
||||
module.exports = class MathCommand extends Command {
|
||||
@@ -22,10 +22,9 @@ module.exports = class MathCommand extends Command {
|
||||
const { expression } = args;
|
||||
try {
|
||||
const solved = math.eval(expression);
|
||||
return msg.say(solved)
|
||||
.catch(() => msg.say('Invalid statement.'));
|
||||
return msg.say(solved).catch(() => msg.say('Invalid Statement.'));
|
||||
} catch (err) {
|
||||
return msg.say('Invalid statement.');
|
||||
return msg.say('Invalid Statement.');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user