#How would I convert a URL into an attachment?

6 messages · Page 1 of 1 (latest)

proper patrol
#

Hello there. So, I'll keep this short. I have a messageDelete event handler, and I have a problem. When a user sends a sticker and deletes it, obviously, I cannot reuse that sticker in my log message. That said, I thought that I could probably retrieve the sticker URL and use it as a file attachment instead. The main problem is that I have no idea how to do that. If someone could enlighten me on how I could achieve this, that would be amazing. Thank you for your help, it is truly appreciated.

shadow verge
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

runic sandalBOT
shadow verge
#

new AttachmentBuilder(url)

lean flame
#

Or just pass the url to the files:[] directly

proper patrol