From ae63a0d52d7186a3eacbaa0474bb9b7a8e6cad5a Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Sun, 12 Jan 2025 02:31:17 -0700 Subject: [PATCH] Add .catch to sending discord messages. Hopefully this will fix the log flooding lol --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index 096b028..8db1200 100644 --- a/index.js +++ b/index.js @@ -473,6 +473,8 @@ xmpp.on("stanza", (stanza) => { console.error(err); }).then((msg) => { if (msg.channel.type === Discord.ChannelType.GuildAnnouncement) msg.crosspost(); + }).catch((err) => { + console.log(`${colors.orange("[WARN]")} Failed to send message to ${channel.guild.name}/${channel.name} (${channel.guild.id}/${channel.id}): ${err}`); }); }); }).catch((err) => {