Attachment in embed
Hey, how can I turn
interaction.options.getAttachment("image");
into an attachment to use in an embed?
I've tried to do const attachment = new AttachmentBuilder(interaction.options.getAttachment("image"), "image.png");
but it says "The resource must be a string, Buffer or a valid file stream." and I can't figure out how to turn it into a buffer.
Could anyone help?6 Replies
• 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.Use the
url
property of the Attachment
returned by getAttachment()
Didn't realize I could just use the URL. Thank you