How do I convert an Attachment into a RawFile
For a modmail, I want to send the user's attachments into a channel and I'm not sure how to
8 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by OPFiles in embeds should be attached via the message option object and referenced in the embed:
^ doesn't help
What is "user's attachments"? Are you referring to attachment options on a slash command? If so, using
<Interaction>.options.getAttachment()
will return the attachment for that option (if specified), which you can simply pass to the files
option when sending the messageattachments from a
Message
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
files: [...message.attachments.values()]
ty!
was wondering why
files: message.attachments.values()
didn't work
forgot it needed to be in an array