forked from Lea/UntisBot
Send error message when fetching timetable fails
This commit is contained in:
parent
64759243c0
commit
072813adc3
|
@ -40,6 +40,15 @@ let fetchUpdates = () => {
|
||||||
});
|
});
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
console.error(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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue