Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

583
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

0

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

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda