so im making a bot that will delete any blacklisted words. but the problem is , the bot wont regonize the word if the word contain upper case. For example hi. if i typed hi the bot will delete the text. but if i typed Hi or hI the bot wont regonize the word
bot.on("message", (message) => {
const swearword =["hi"]
if( swearword.some(word => message.content.includes(word)) ) {
message.delete();
message.reply("That word is blacklisted").then(m => m.delete({timeout: 6000}));
console.log(message.author + (" said the blacklisted word"))
}});