From d236181231d5f4a84381f0aa5874dc44bf139689 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Wed, 8 May 2024 07:48:59 -0600 Subject: [PATCH] Fix error handling when sending message to channel --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index e621eb5..fc44649 100644 --- a/index.js +++ b/index.js @@ -209,7 +209,9 @@ xmpp.on("stanza", (stanza) => { } ).then((msg) => { if (msg.channel.type === Discord.ChannelType.GuildAnnouncement) msg.crosspost(); - }) + }).catch((err) => { + console.log(`Failed to send message to ${row.channelid}, ${err}`); + }); }); }); }