Basic thing I just need fixed; wanting to download a file from attachment but i'm not sure how to describe the attachment as an object/file.
I just have this:
let jimage = message.attachments.first()
fs.writeFileSync(`./${jimage.filename}`, jimage)
Only issue is that, for FS's second argument, discord doesn't have a selection for just the file. Reason i'm trying this way is because I took this idea from here: how to save an image from discord using discord bot node js But "attachment.file" isn't a real thing. Other threads show just really overly complicated methods with new calls, like something called request, I just wanna do this straight off fs and discord.