sexy dark chocolate
sexy dark chocolate
DIAdiscord.js - Imagine an app
Created by sexy dark chocolate on 5/8/2023 in #djs-questions
AttachmentBuilder and MessagePayloads
I tried to read the source code on attachment builders and the files option for when sending a message but I just don't seem to understand how it works. For example, I did
const att = new AttachmentBuilder(urlToSiteWithMp4, { name: "test.mp4" })

channel.send({ files: [att] });
const att = new AttachmentBuilder(urlToSiteWithMp4, { name: "test.mp4" })

channel.send({ files: [att] });
It took a while to send the attachment and then I remembered I was told that attachments download or something like that. I said I'd like to make a progress bar so I checked the source code to see if theres any functions that create/download the attachment but I seen nothing. How do attachments/the attachmentbuilder work with messagepayload and how would I track its progress till it sends the attachment?
5 replies