Add .catch to sending discord messages. Hopefully this will fix the log flooding lol
Some checks are pending
ptero-push / build (push) Waiting to run
Some checks are pending
ptero-push / build (push) Waiting to run
This commit is contained in:
parent
73e42e2288
commit
ae63a0d52d
2
index.js
2
index.js
|
@ -473,6 +473,8 @@ xmpp.on("stanza", (stanza) => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
}).then((msg) => {
|
}).then((msg) => {
|
||||||
if (msg.channel.type === Discord.ChannelType.GuildAnnouncement) msg.crosspost();
|
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) => {
|
}).catch((err) => {
|
||||||
|
|
Loading…
Reference in a new issue