title: Discord.js using interval and clearinterval
body: <p>Why is my code not working? I try when someone says: spam the bot begins spamming (it does but it will not stop) How can I fix this problem?</p>
  <pre><code>client.on(&quot;message&quot;, msg =&gt; {
    
  
  let interval;
  
  if (msg.content === 'yoyo') { 
    // ...
    if (!interval) {
      interval = setInterval(function() {
        msg.channel.send('yo')
          .catch(console.error);
      }, 1 * 5000);
    } else {
      message.channel.send('yo already running');
    }
  }
  
  if (msg.content === 'stop') {
    clearInterval(interval);
    interval = 1 * 1000000;
  }
  });
  </code></pre>