blacklist word discord js

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

showing results for - "blacklist word discord js"
Isabelle
22 Jul 2020
1    let blacklisted = ['word', 'word'];
2    let foundInText = false;
3    for (var i in blacklisted) {
4      if (message.content.toLowerCase().includes(blacklisted[i].toLowerCase())) foundInText = true;
5    }
6    if (foundInText) {
7      message.delete();
8      Message.channel.send();
Marlon
22 Apr 2018
1client.on('message', badboy => {
2let args = badboy.content.split(" ").slice(0).join(" ");
3if(args.includes(" احا ")) {
4  badboy.delete()
5badboy.channel.send(`this word not allowed here`)
6}
7});