title: Auto send message discord.js
body: <p>I have a selfbot project for Discord (I know it's against the ToS, but this is just an experiment I'm not going to use it)</p>
  <p>I want the selfbot to send a message like &quot;this is an example message&quot; every hour in a specific channel with the ID (783651779207626752)</p>
  <p>What and where should I add something in the code?</p>
  <pre><code>const Discord = require(&quot;discord.js&quot;)
  const client = new Discord.Client()
  const { prefix, token } = require(&quot;./config.json&quot;)
  const fs = require(&quot;fs&quot;)
  const { table, getBorderCharacters } = require(&quot;table&quot;)
  
  
  const commands = new Discord.Collection();
  
  let commandFiles
  
  function loadCommands() {
      console.log(&quot;loading commands..&quot;)
      const startTime = new Date().getTime()
  
      commandFiles = fs.readdirSync(&quot;./commands/&quot;).filter(file =&gt; file.endsWith(&quot;.js&quot;));
      const failedTable = []
  
      if (commands.size &gt; 0) {
          for (command of commands.keyArray()) {
              delete require.cache[require.resolve(`./commands/${command}.js`)]
          }
          commands.clear()
      }
  
      for (file of commandFiles) {
          let command
          
          try {
              command = require(`./commands/${file}`);
  
              let enabled = true;
          
              if (!command.name || !command.description || !command.run) {
                  enabled = false;
              }
  
              if (enabled) {
                  commands.set(command.name, command);
              } else {
                  failedTable.push([file, &quot;❌&quot;])
              }
          } catch (e) {
              failedTable.push([file, &quot;❌&quot;])
          }
      }
  }
  
  loadCommands()
  
  exports.reloadCommands = loadCommands
  
  client.once(&quot;ready&quot;, () =&gt; {
      console.log(&quot;logged in as &quot; + client.user.username + &quot;#&quot; + client.user.discriminator)
  })
  
  function runCommand(cmd, message, args) {
      args.shift()
      try {
          commands.get(cmd).run(message, args)
      } catch(e) {
          console.log(e)
      }
  }
  
  setTimeout(() =&gt; {
      client.login(token)
  }, 1500)
  </code></pre>