Setting buffer attachment not working. The resource must be a string, Buffer or a valid file stream
Hi,
I am getting the error
The resource must be a string, Buffer or a valid file stream.
when trying to send file attachments from buffers.
Why might this be happening?
For sending the message:
For turning the base64 string to a buffer:
2 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 OPso, it has to do with the way I am passing the attachments through the context.
not sure how to fix
fixed