diff --git a/index.js b/index.js index fd610f1..a3a700c 100644 --- a/index.js +++ b/index.js @@ -427,7 +427,7 @@ const handleDiscord = function (data) { let channel = discord.channels.cache.get(row.channelid); if (!channel) return console.log(`${colors.red("[ERROR]")} Channel ${row.channelid} not found`); - if (!filters.some((filter) => body.toLowerCase().includes(filter)) && !filters.some((filter) => text.toLowerCase().includes(filter))) return; + if (!filters.some((filter) => string.toLowerCase().includes(filter)) && !filters.some((filter) => text.toLowerCase().includes(filter))) return; thisMsg = JSON.parse(JSON.stringify(discordMsg)); thisMsg.content = row.custommessage || null; channel.send(thisMsg).catch((err) => { @@ -508,7 +508,7 @@ const handleDiscord = function (data) { let user = discord.users.cache.get(row.userid); if (!user) return console.log(`${colors.red("[ERROR]")} User ${row.userid} not found`); - if (!filters.some((filter) => body.toLowerCase().includes(filter)) && !filters.some((filter) => text.toLowerCase().includes(filter))) return; + if (!filters.some((filter) => body.string.toLowerCase().includes(filter)) && !filters.some((filter) => text.toLowerCase().includes(filter))) return; thisMsg = JSON.parse(JSON.stringify(discordMsg)); thisMsg.content = row.custommessage || null; user.send(thisMsg).catch((err) => {