title: Discord.js | How to make a loop message every 24 hours / a day with a variable?
body: <p>I'm here trying to make a Discord Bot with NodeJS or Discord.js. I want to make a message that sends every day, but with a variable that increases by 1 every day too, so like day 1: Yeet 1, day 2: Yeet 2, and so on.</p>
  <p>But however, I have no idea how to do that, Well because I am new to Discord.js. Here's my code:</p>
  <pre><code>const discord = require(&quot;discord.js&quot;);
  
  var client = new discord.Client();
  
  client.on('message', function(message) {
      // Now, you can use the message variable inside
      if (message.content === &quot;$loop&quot;) {
          daytime = 0;
          var interval = setInterval (function () {
              dayResult = daytime + 1;
              // use the message's channel (TextChannel) to send a new message
              message.channel.send(&quot;quack &quot; + dayResult)
              .catch(console.error); // add error handling here
          }, 86400 * 1000); 
          
      }
  });
  </code></pre>
  <p>1 day = 86400 seconds if I'm right.
  It would be really helpful if you helped me.</p>