mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-21 05:54:33 +02:00
Code Improvements
This commit is contained in:
@@ -31,8 +31,7 @@ module.exports = class MathCommand extends Command {
|
||||
try {
|
||||
const solved = math.eval(expression);
|
||||
return message.say(solved).catch(() => message.say(':x: Error! Invalid statement!'));
|
||||
}
|
||||
catch (err) {
|
||||
} catch (err) {
|
||||
return message.say(':x: Error! Invalid statement!');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,8 +34,7 @@ module.exports = class TodayCommand extends Command {
|
||||
.setTimestamp()
|
||||
.setDescription(`${events[randomNumber].text} (${events[randomNumber].year})`);
|
||||
return message.embed(embed);
|
||||
}
|
||||
catch (err) {
|
||||
} catch (err) {
|
||||
return message.say(':x: Error! Something went wrong!');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user