mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 08:12:04 +02:00
Minor Error Catching Modifications
This commit is contained in:
@@ -30,7 +30,7 @@ module.exports = class MathCommand extends Command {
|
||||
const expression = args.expression;
|
||||
try {
|
||||
const solved = math.eval(expression);
|
||||
return message.say(solved).catch(err => message.say(':x: Error! Invalid statement!'));
|
||||
return message.say(solved).catch(() => message.say(':x: Error! Invalid statement!'));
|
||||
}
|
||||
catch (err) {
|
||||
return message.say(':x: Error! Invalid statement!');
|
||||
|
||||
@@ -26,6 +26,6 @@ module.exports = class CowsayCommand extends Command {
|
||||
text: turnToCowsay,
|
||||
e: 'oO',
|
||||
T: 'U '
|
||||
})).catch(error => message.say(':x: Error! Perhaps the content is too long?'));
|
||||
})).catch(() => message.say(':x: Error! Perhaps the content is too long?'));
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user