There is at least one instance where an error should be delivered to the user instead of being thrown. For instance, instead of throwing a console error and crashing the bot, this should send an embed that tells the user to setup the course role settings.
const courseRoleSettings = await CourseRolesSetting.findOne({ where: { guildId: guild.id } });
if (courseRoleSettings === null) {
throw new Error("Course role settings are not configured.");
}
There is at least one instance where an error should be delivered to the user instead of being thrown. For instance, instead of throwing a console error and crashing the bot, this should send an embed that tells the user to setup the course role settings.