title: Discord.js sending a message in 1 minute intervals
body: <p>Hello I'm trying to send out an automated message to discord but I keep getting the following error:</p>
  
  <pre><code>bot.sendMessage is not a function
  </code></pre>
  
  <p>I'm unsure as to why I'm getting this error, below is my code;</p>
  
  <pre><code>var Discord = require('discord.js');
  var bot = new Discord.Client()
  
  bot.on('ready', function() {
      console.log(bot.user.username);
  });
  
  bot.on('message', function() {
      if (message.content === "$loop") { 
        var interval = setInterval (function () {
          bot.sendMessage(message.channel, "123")
        }, 1 * 1000); 
      }
  });
  </code></pre>