fix: log PluginLoadError guild id correctly

This commit is contained in:
Dragory 2023-04-01 22:57:30 +03:00
parent bd6c73891d
commit c136c117d2
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -61,8 +61,8 @@ const SAFE_TO_IGNORE_ERIS_ERROR_CODES = [
const SAFE_TO_IGNORE_ERIS_ERROR_MESSAGES = ["Server didn't acknowledge previous heartbeat, possible lost connection"];
function errorHandler(err) {
const guildName = err.guild?.name || "Global";
const guildId = err.guild?.id || "0";
const guildId = err.guild?.id || err.guildId || "0";
const guildName = err.guild?.name || (guildId && guildId !== "0" ? "Unknown" : "Global");
if (err instanceof RecoverablePluginError) {
// Recoverable plugin errors can be, well, recovered from.