title: Discord.JS Get First Attachment in Message
body: <p>I just want to use my Discord.JS bot to get the first attachment in a <a href="https://discord.js.org/#/docs/main/stable/class/Message" rel="nofollow noreferrer">message</a> (<a href="https://discord.js.org/#/docs/main/stable/class/MessageAttachment" rel="nofollow noreferrer">MessageAttatchment</a> object), simply put. I have already tried this, but it just seems to crash immediately.</p>
  
  <pre><code>  var Attachment = (message.attachments)
    if (Attatchment){
      console.log( Attatchment.array()[0] )
      console.log( Attatchment.array()[0].url )
    }
  </code></pre>
  
  <p>The crash might not be due to this, it could be due to relevant code surrounding the area, but this is not a problem, since if I find a solution, that relevant code will become irrelevant.</p>