forked from ChrisChrome/weather-bot
Fix error handling when sending message to channel
This commit is contained in:
parent
f4fa286766
commit
d236181231
4
index.js
4
index.js
|
@ -209,7 +209,9 @@ xmpp.on("stanza", (stanza) => {
|
||||||
}
|
}
|
||||||
).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(`Failed to send message to ${row.channelid}, ${err}`);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue