📅  最后修改于: 2022-03-11 15:02:09.040000             🧑  作者: Mango
const blacklist = ['bad word 1', 'bad word 2', 'bad word 3']
blacklist.forEach(word => {
// 'word' represents an element inside of the array.
// Everytime the client is finished walking through an element, the value of 'word' changes to the next one!
if (message.content.toLowerCase().includes(word)) message.delete() && message.author.send("Keep the use of Profanity out of our server!")
})