discord js bad word filter

Solutions on MaxInterview for discord js bad word filter by the best coders in the world

showing results for - "discord js bad word filter"
Jock
13 Sep 2017
1// I DOUBT IF IT WORKS //
2// COMPLICATED SCRIPT BY ME //
3client.on('message', message => {
4    const FilteredWords = ["darn", "fuck", "bitch", "pussy", " ass", "nigga", "fucker", "fuk", "shit", "nigg", "dick", "cock", "fuk", "slut", "schmuck", "piss", "bollock", "effing", "prick", "frigger", "heck", "pennis", "dick", " cock", "screw you", "dweeb", "horny", "edgey", " sex", "faggot", "fag", "cunt"]
5            const ProfanityEmbed = new Discord.MessageEmbed()
6                .setColor('#b700ff')
7                .setTitle("Profanity is Not Allowed in This Server")
8                if (FilteredWords.some(w => `${message.content.toLowerCase()}`.includes(`${w}`))) {
9                  message.delete()
10                  message.channel.send(ProfanityEmbed)
11                  .then(message => {
12                      setTimeout(function() {
13                          message.delete()
14                      }, 5000);
15            })
16        }
17    }
18}