Adding a new field to an existing embed

I'm currently fetching the message containing the embed I was to edit and then getting the embed, but I can't figure out how to add a field to it without having to resend the entire embed?
const message = await channel.messages.fetch(id);
const originalEmbed = message.embeds[0];

originalEmbed.addFields({ name: 'test', value: 'test' })
const message = await channel.messages.fetch(id);
const originalEmbed = message.embeds[0];

originalEmbed.addFields({ name: 'test', value: 'test' })
8 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
zevnda
zevndaOP3y ago
Would you mind elaborating? I understand I fetch the message containing the embed, and then edit that message with the new embed. But I don't understand how to add a new field to that existing embed
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
zevnda
zevndaOP3y ago
originalEmbed.addFields({ name: 'test', value: 'test' }) says .addFields isn't a function
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
chewie
chewie3y ago
That is correct, as message.embeds[0] returns EmbedData. EmbedBuilder.from(message.embeds[0]) would be the way to go.
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
zevnda
zevndaOP3y ago
Awesome, will give that a whirl Like a charm 👌

Did you find this page helpful?