i am trying to write a event that will delete any message with specific key words but it is not doing anything.
client.on("message", (message) => {
if (message.author.bot) return;
if (message.member.roles.some(r => ["DEAN!"].includes(r.name))) return;
let words = ["crack", "hack", "hacked", "patch", "patched", "crackd"]
if (message.content.includes(words)) {
message.channel.send(`${message.author} You cannot say such words!`);
message.delete();
console.log(chalk.bgYellow("INFO") + (` message containing restricted words by ${message.author} was deleted`));
}
});