3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-20 00:05:04 +00:00

Fix possible error in error handling

This commit is contained in:
Dragory 2020-09-13 21:39:56 +03:00
parent 112c65122b
commit f9d907a02c

View file

@ -52,7 +52,7 @@ if (process.env.NODE_ENV === "production") {
// Log it in the console as a warning and post a warning to the guild's log.
// tslint:disable:no-console
console.warn(`${err.guild.name}: [${err.code}] ${err.message}`);
console.warn(`${err.guild?.name || "Global"}: [${err.code}] ${err.message}`);
const logs = new GuildLogs(err.guild.id);
logs.log(LogType.BOT_ALERT, { body: `\`[${err.code}]\` ${err.message}` });