mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 08:17:35 +02:00
A variety of fixes and a change in the way errors are handled.
This commit is contained in:
@@ -21,9 +21,9 @@ module.exports = class MathCommand extends Command {
|
||||
try {
|
||||
const solved = math.eval(expression);
|
||||
return message.say(solved)
|
||||
.catch(() => message.say(':x: Error! Invalid statement!'));
|
||||
.catch(() => message.say('Invalid statement.'));
|
||||
} catch (err) {
|
||||
return message.say(':x: Error! Invalid statement!');
|
||||
return message.say('Invalid statement.');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user