title: Discord.js deleteMessage() doesn't work
body: <p>I am creating a Discord bot with discord.js and I'd like to create a command that can clear messages. For now, I have this code (only the interesting part) and I can't figure out why it doesn't work:</p>
  
  <pre><code>// Importing discord.js, creating bot and setting the prefix 
  const Discord = require('discord.js');
  const bot = new Discord.Client();
  const prefix = "/";
  
  // Array that stores all messages sent
  messages = [];
  
  bot.on('message', (message) =&gt; {
  
     // Store the new message in the messages array
     messages.push(message);
  
     // Split the command so that "/clear all" becames args["clear", "all"]
     var args = message.content.substring(prefix.length).split(" ");
  
     // If the command is "/clear all"
     if(args[0] == "clear" &amp;&amp; args[1] == "all") {
  
        bot.deleteMessages(messages); // Code that doesn't work
  
        // Resets the array
        messages = [];
  
     }
  }
  
  // CONNECT !!!
  bot.login('LOGING TOKEN HERE');
  </code></pre>
  
  <p>Can you help me ?</p>