mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 13:53:12 +02:00
Better Today Error Checks
This commit is contained in:
@@ -38,7 +38,8 @@ module.exports = class TodayCommand extends Command {
|
||||
.setDescription(`${event.year}: ${event.text}`);
|
||||
return msg.embed(embed);
|
||||
} catch (err) {
|
||||
return msg.say(`An error occurred: \`${err.message}\`. You likely entered an invalid date.`);
|
||||
if (err.status === 404 || err.status === 500) return msg.say('Invalid Date.');
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user