Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

580
Vistas
How to add field to existing Embed (Discord.js v14)?

I get an embed out of a message and I want to add a field and then edit the message. Before I upgraded to v14, I could just do embed.addFields(). But now, when doing this, it just removes every property (color, description, etc.) from the embed, except for the field I add.

  let embed = new EmbedBuilder(msg.embeds[0])
  embed.addFields({name:'\u200B', value:`${emoji} ${role}`, inline:false})
  msg.edit({embeds: [embed]})
  msg.react(emoji);

I have also tried embed.fields.push(), but that also hasn't worked (the console says the function is undefined).

about 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

new EmbedBuilder() doesn't accept an Embed as the parameter. Use .data, .toJSON() or EmbedBuilder.from() (which does accept an Embed)

new EmbedBuilder(msg.embeds[0].data)
new EmbedBuilder(msg.embeds[0].toJSON())
EmbedBuilder.from(msg.embeds[0])

any of the lines above will work

about 4 years ago · Santiago Trujillo Denunciar

0

Try EmbedBuilder.from(msg.embeds[0]) instead of new EmbedBuilder(msg.embeds[0])

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda