diff --git a/src/structure/components/observers/Automoderation.js b/src/structure/components/observers/Automoderation.js index 176e05d..c8a68ee 100644 --- a/src/structure/components/observers/Automoderation.js +++ b/src/structure/components/observers/Automoderation.js @@ -422,9 +422,11 @@ module.exports = class AutoModeration extends Observer { async filterLinks(message, edited) { - const { guild, author, guildWrapper: wrapper } = message; - let { channel } = message; - if (channel.partial) channel = await channel.fetch(); + const { guild, author, guildWrapper: wrapper, channel } = message; + if (!channel) { + this.logger.warn(`Missing channel?\nChannelId: ${message.channelId}\nGuild: ${message.guildId}\nAuthor: ${inspect(author)}`, { broadcast: true }); + return; + } if (!guild || author.bot || message.filtered) return; const member = message.member || await guild.members.fetch(author.id).catch(() => null);