title: Delete all messages in a channel from my bot
body: <pre><code>channel.fetchMessages()
  .then(messages =&gt; messages.array.forEach(
      message =&gt; message.author.equals(client.user) &amp;&amp; message.delete()
  ));
  </code></pre>
  
  <p>Tried to do this to delete from TextChannel <code>channel</code> all messages that my bot has sent.</p>
  
  <p>Doesn't work, errors:</p>
  
  <blockquote>
    <p><code>messages.array.forEach</code> is not a function</p>
  </blockquote>
  
  <p>How can I get my bot to delete all the messages my bot has sent to a specific channel?</p>