Update message with images using discord.js REST
I'm trying to add images to a message using discord.js/REST V10, but without success
My code:
I'm can patch the webhook message to change embeds, components and other stuff. But I still can't add files like images to it
Maybe I'm doing it wrong?
8 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.I forgot to mention that the image "appears", but buggy
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I want to send an image. I'm using
files
because it was what I found in rest.patch optionsUnknown User•2y ago
Message Not Public
Sign In & Join Server To View
A canvas is still a kind of image. So this don't exactly solve my problem
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
The source of the file that I'm trying to send is a image. That's why, if I understood right, It won't work using canvas
What I'm trying to achieve is:
I have a PNG that I want to send using discord.js/REST. So I want to know how to do it, because I know, reading Discord API, that it's possible. I just don't know how to do it with this subpackage, because when I try to do it, it return a buggy attachment
The main reason is just legacy code... I started to work with this project not long ago
I didn't know about webhookclient. Going to check and probably use it instead
Guys. Thanks for the help! Problem solved