I just want to use my Discord.JS bot to get the first attachment in a message (MessageAttatchment object), simply put. I have already tried this, but it just seems to crash immediately.
var Attachment = (message.attachments)
if (Attatchment){
console.log( Attatchment.array()[0] )
console.log( Attatchment.array()[0].url )
}
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.