Send error message when fetching timetable fails

This commit is contained in:
Jan 2020-12-06 20:40:46 +01:00
parent 64759243c0
commit 072813adc3

View file

@ -40,6 +40,15 @@ let fetchUpdates = () => {
});
} catch(e) {
console.error(e);
try {
let embed = new Discord.MessageEmbed()
.setTitle('An error has occurred.')
.setDescription(`\`\`\`js\n${e}\`\`\``)
.setColor(0xff0000);
sendEmbed(embed);
} catch(e) {
console.error(e);
}
}
}