Embed with discordjs/rest

Can you send embeds using discordjs/rest? I have only sent strings using rest.post but I was wondering if I could build an embed using embedbuilder, and send that embeds with the same POST request
6 Replies
d.js toolkit
d.js toolkit10mo ago
- 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!
space
space10mo ago
sure
ggonick
ggonick10mo ago
would I just send the embed in the
body: { content: myEmbed}
body: { content: myEmbed}
space
space10mo ago
It should be under embeds in an array instead.
ggonick
ggonick10mo ago
sounds good, just a followup on that do you have the docs for the rest.post function? I can't seem to find any of the docs for the discordjs/rest functions
space
space10mo ago
might need to switch the version to the one you use: https://discordjs.dev/docs/packages/rest/main/REST:Class#post