我写下了这段代码,机器人会检测到坏词,然后说“语言!”但不会删除用户发送的消息。
if (badWords.some(word => msg.content.includes(word))) {
msg.delete(1000)
msg.reply("LANGUAGE, YOU MUFFIN!!")
}
})
答案 0 :(得分:0)
//Replace these words with the bad words
const word = ['shrex','fiona', 'rick astley']
for(i = 0; i < word.length; i++) {
if(message.content.toLowerCase().includes(word[i])) {
message.delete()
message.reply("You muffin.")//Change this to whatever you want it to say
}
}