From b208e0ed22ee14cca570b6d3156522936ee448ce Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Fri, 30 Dec 2022 21:38:49 -0800 Subject: [PATCH] Fix disabledChannels filter --- src/events/messageDelete.ts | 2 +- src/events/messageUpdate.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/events/messageDelete.ts b/src/events/messageDelete.ts index 428212e..f1f9cfe 100644 --- a/src/events/messageDelete.ts +++ b/src/events/messageDelete.ts @@ -9,7 +9,7 @@ export default { if (msg.guild?.id != client.config.mainServer.id) return; if (msg.partial) return; if (msg.author.bot) return; - if (disabledChannels) return; + if (disabledChannels.includes(msg.channelId)) return; const embed = new client.embed().setColor(client.config.embedColorRed).setTimestamp().setAuthor({name: `Author: ${msg.author.tag} (${msg.author.id})`, iconURL: `${msg.author.displayAvatarURL()}`}).setTitle('Message deleted').setDescription(`<@${msg.author.id}>\n\`${msg.author.id}\``); if (msg.content.length != 0) embed.addFields({name: 'Content', value: `\`\`\`\n${msg.content.slice(0,1000)}\n\`\`\``}); embed.addFields( diff --git a/src/events/messageUpdate.ts b/src/events/messageUpdate.ts index ff7ae74..0d81e5a 100644 --- a/src/events/messageUpdate.ts +++ b/src/events/messageUpdate.ts @@ -11,7 +11,7 @@ export default { if (oldMsg.partial) return; if (newMsg.partial) return; if (!newMsg.member) return; - if (disabledChannels) return; + if (disabledChannels.includes(newMsg.channelId)) return; const msgarr = newMsg.content.toLowerCase().split(' '); if (client.bannedWords._content.some((word:string)=>msgarr.includes(word)) && (!client.isStaff(newMsg.member))) newMsg.delete(); if (newMsg.content === oldMsg.content) return;