log send errors

This commit is contained in:
Thomas Rudin 2020-01-29 09:52:02 +01:00
parent 443d2669bf
commit e453dfb563

View File

@ -33,7 +33,9 @@ module.exports = function(remote, events){
const channel = client.channels.find(ch => ch.name == discord_channel_name);
if (channel) {
if (event.username){
channel.send(`<${event.username}${event.type == "minetest" ? "" : "@" + event.name}> ${event.message}`);
channel
.send(`<${event.username}${event.type == "minetest" ? "" : "@" + event.name}> ${event.message}`)
.catch(e => console.warn("discord send error", e));
} else {
channel.send(`${event.message}`);
}