diff --git a/index.js b/index.js index 2ac90a7..c7ceccc 100644 --- a/index.js +++ b/index.js @@ -475,6 +475,50 @@ xmpp.on("stanza", (stanza) => { if (msg.channel.type === Discord.ChannelType.GuildAnnouncement) msg.crosspost(); }).catch((err) => { console.log(`${colors.yellow("[WARN]")} Failed to send message to ${channel.guild.name}/${channel.name} (${channel.guild.id}/${channel.id})`); + const logChannel = discord.guilds.cache.get(config.discord.mainGuild).channels.cache.get(config.discord.logChannel); + logChannel.send({ + embeds: [ + { + title: "Failed to send message", + description: `There is likely an issue with permissions. Please notify the server owner if possible.`, + fields: [ + { + name: "Guild", + value: `${channel.guild.name} (\`${channel.guild.id}\`)` + }, + { + name: "Channel", + value: `<#${channel.id}> (\`${channel.id}\`)` + }, + { + name: "Guild Owner", + value: `<@${channel.guild.ownerId}> (\`${channel.guild.ownerId}\`)` + }, + { + name: "Subscribed Room", + value: `\`${fromChannel}\`` + }, + { + name: "Custom Message", + value: row.custommessage || "None" + }, + { + name: "Filter", + value: row.filter || "None" + }, + { + name: "Event Filter", + value: row.filterEvt || "None" + }, + { + name: "Minimum Priority", + value: row.minPriority.toString() + } + ], + color: 0x00ff00 + } + ] + }); }); }); }).catch((err) => {