How to send a file/attachment from an Attachment option on SlashCommand?
I've looked up that topic the the guide but can't find anything on how to send an attachment/file that I get from a slash command.
10 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 OPGet the URL and use it to make an attachment and pass it to files
Ah okay 👍🏻
So, is it just
new AttachmentBuilder(someAttachmentURL)
?I know
so I can just use the attachement I got from the command option to directly send it?
It returns an Attachment and files array can take it
Ah okay, makes sense.