title: Discord.js How do I make my bot read an entire sentence for banned words?
body: <p>I am new to coding and I just can not figure out how to make my discord bot read sentences that people write in discord and scan for banned words. Basically I need it to delete messages with banned words. Here is my code so far for it. Thank you for taking the time to read this!</p>
  <pre><code>//Banned words
  
  
  var badwords = (&quot;swearword1&quot;, &quot;swearword2&quot;)
  badwords.search(bot.on('message', message =&gt; {
      switch(message.content.toLowerCase()) {
          case badwords:
              message.delete()
      }
  }));
  </code></pre>