title: Discord.js - How to spam messages in a text channel?
body: <p>I'm trying to make a discord bot and my client wants me to have a command that spams something into a text channel.</p>
  
  <p>I have tried using a for loop on its own and a while loop with a for loop as seen below:</p>
  
  <p>With for and while loop:</p>
  
  <pre><code>    case "command":
      for(var i = 0; i &gt;=20; i++){
          while(i &lt;20){
              message.channel.send("spam");
          }
      }
      break;
  </code></pre>
  
  <p>With for loop:</p>
  
  <pre><code>case "command":
  for(var i = 0; i &gt;=20; i++){
          message.channel.send("spam");
  }
  break;
  </code></pre>
  
  <p>When I place a message.channel.send outside of the loop, then it shows up once.</p>
  
  <p>Any help would be greatly appreciated, thanks.</p>