Discord. Js Embed Builder Error (. Description Field Required)

When trying to send a Discord.js embed, I'm getting a "DiscordAPIError: Invalid Form Body embeds[0].description: This field is required" error. Does anyone know why this is happening? I suspect this might be an issue with the source code. I'm using Discord.js v13, and I copied the embed straight off of the Discord.js guide website:

const exampleEmbed = new EmbedBuilder()
.setColor(0x0099FF)
.setTitle('Some title')
.setURL(')
.setAuthor({ name: 'Some name', iconURL: ' url: ' })
.setDescription('Some description here')
.setThumbnail(')
.addFields(
    { name: 'Regular field title', value: 'Some value here' },
    { name: '\u200B', value: '\u200B' },
    { name: 'Inline field title', value: 'Some value here', inline: true },
    { name: 'Inline field title', value: 'Some value here', inline: true },
)
.addFields({ name: 'Inline field title', value: 'Some value here', inline: true })
.setImage(')
.setTimestamp()
.setFooter({ text: 'Some footer text here', iconURL: ' });

outputChannel.send({ embeds: [exampleEmbed] });

Thanks!

2

1 Answer

You can't use EmbedBuilder in discord.js v13 because this is a discord.js v14 constructor.
Just change it to MessageEmbed and it should work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest