title: How can I send a message every day at a specific hour?
body: <p>I'm trying to make the bot writing messages at specific times. Example:</p>
  
  <pre><code>const Discord = require("discord.js");
  const client = new Discord.Client();
  client.on("ready", () =&gt; {
    console.log("Online!");
  });
  var now = new Date();
  var hour = now.getUTCHours();
  var minute = now.getUTCMinutes();
  client.on("message", (message) =&gt; {
    if (hour === 10 &amp;&amp; minute === 30) {
      client.channels.get("ChannelID").send("Hello World!");
    }
  });
  </code></pre>
  
  <p>Unfortunately, it only works once I trigger another command like:</p>
  
  <pre><code>if (message.content.startsWith("!ping")) {
    message.channel.send("pong!");
  }
  </code></pre>
  
  <pre class="lang-none prettyprint-override"><code>my message: !ping (at 10:10 o'clock)
  -&gt; pong!
  -&gt; Hello World!
  </code></pre>
  
  <p>I guess it needs something that constantly checks the time variables.</p>