title: How do I filter words with a discord bot? (JavaScript)
body: <p>I have recently created a bot for my discord server. Now I want him to filter bad words.</p>
  
  <p><strong>For example:</strong></p>
  
  <hr>
  
  <p>User (without bot): You are an asshole</p>
  
  <hr>
  
  <p>User (with bot): You are an [I'm stupid because I swear]</p>
  
  <hr>
  
  <p>Is this even possible in Discord? I have given my bot all permissions! (including removing messages, it can't edit message with the program self tho)</p>
  
  <p>If that is not possible^ Can we do the following?</p>
  
  <p>The ability to directly delete the message and write the following:</p>
  
  <hr>
  
  <p>Bot: @username Do not swear!</p>
  
  <hr>
  
  <p>Now I have the following code (I dont know if useful):      </p>
  
  <pre><code>const Discord = require('discord.js');
  const client = new Discord.Client();
  
  client.on('ready', () =&gt; {
      console.log('Hello, the bot is online!')
  });
  
  client.on('message', message =&gt; {
      if(message.content === '--Trump'){
          message.reply('He is the president of the United States of 
  America!');
      }
      if(message.content === '--Putin'){
          message.reply('He is the president of Russia!');
      }
  });
  
  client.login('MzAwMzM5NzAyMD*1NDUxNzc4.C8rH5w.M44LW*nrfbCR_zHzd**vtMqkr6nI');
  </code></pre>