title: setInterval without calling a function Discord rpc
body: <p>I was trying to make a little boop command on my discord rpc
  but it ended up that using setInterval to get an updated version of the rpc ended up adding boops++;
  since it was calling the URL function</p>
  <p>any ideas on how to make it not call the function but keep everything working and updated? Is there a
  better alternative to setInterval?</p>
  <pre class="lang-js prettyprint-override"><code>var rpc = require(&quot;discord-rpc&quot;)
  var fetch = require(&quot;node-fetch&quot;)
  const client = new rpc.Client({
    transport: 'ipc'
  })
  let boops = 0
  function url() {
    boops++;
    return &quot;https://i.pinimg.com/originals/32/04/c5/3204c53493fcb595a5a87427f2d6cf71.gif&quot;
  }
  client.on('ready', () =&gt; {
    client.request('SET_ACTIVITY', {
      pid: process.pid,
      activity: {
        details: `zoe hash been booped`,
        state: `${boops} times`,
        assets: {
          large_image: &quot;image&quot;,
          large_text: &quot;Nya~!&quot; // THIS WILL SHOW AS &quot;Playing &lt;Status&gt;&quot; from the outisde
        },
        buttons: [{
          label: &quot;Boop zoe✨&quot;,
          url: url()
        }],
      }
    })
  
    // activity can only be set every 15 seconds
    setInterval(() =&gt; {
      client.request('SET_ACTIVITY', {
        pid: process.pid,
        activity: {
          details: `zoe hash been booped`,
          state: `${boops} times`,
          assets: {
            large_image: &quot;image&quot;,
            large_text: &quot;Nya~!&quot; // THIS WILL SHOW AS &quot;Playing &lt;Status&gt;&quot; from the outisde
          },
          buttons: [{
            label: &quot;Boop zoe✨&quot;,
            url: url()
          }],
        }
      })
    }, 15e3);
  });
  
  
  client.login({
    clientId: &quot;828106833251663912&quot;
  }).catch(console.error);
  </code></pre>