#Add thumbnail embed from locally running api
9 messages · Page 1 of 1 (latest)
- What's your exact discord.js
npm list discord.jsand nodenode -vversion? - Not a discord.js issue? Check out #1081585952654360687.
- 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 OP
do you mean local files?
I know local files are not supported for embed thumbnail
But I'm planning to deploy a website someday, and I'm starting to test stuff to learn how to use apis, and I came across this interrogation
If I'm running a rest api locally with every image etc that the bot as well as the website would use, could I also store embed thumnails and use them from there?
local files are supported though
Files in embeds should be attached via the message option object and referenced in the embed:
const attachment = new AttachmentBuilder('./image.png', { name: 'image1.png' });
const embed = new EmbedBuilder()
.setTitle('Attachments')
.setImage(`attachment://${attachment.name}`);
channel.send({
embeds: [embed],
files: [attachment]
});