Attachment won't send
Hello everyone, again, so this time i encountered an issue where when i take attachment as an option I cannot output it.
Code:
Node version:
v22.9.0
Discord.js version: [email protected]
13 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:
never mind
thanks
okay after another test
doing
is the same as
still doesnt show the image
Show the full send method
i sent the full code if thats okay
And where are you attaching the files like it explains in the tag
oh the
files: [attachmentUse] //in my case
?
yeah tried it too
does not work
it just replies
and then makes an errorWhich is...
Because not doing it correctly sure isn't going to make it work. If you get an error while trying to use the correct method, you need to address the error, not revert to a non working method
okay so currently the error with the attachment is fixed
the other error is just a
InteractionAlreadyReplied
i do not know why it didnt work first time
it might have been me forgetting to npm run test
after the changes
of course theres a nevermind in this
I think it's trying to look for it on your computer because of how you structure the builder
You should be able to use the attachment URL and pass that to the builder
im a complete newbie in discord.js so idk how to get the URL, since the user chooses the attachment
The docs tell you what getAttachment returns, and it has a clickable link that if you follow will show you all the properties of the object
okay so- thank you a lot
ill mark this as solved