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

231
Visualizações
Discord.js V13: How to edit Message Object of Interaction?

I am trying to update my discord bot to the new version of discord.js (v13). I have a message with an embed and two buttons, one for previous Page and one for next page. When a user clicks a button, I am trying to edit the embed to show something else. But then I get a

TypeError: interaction.message.edit() is not a function.

I can print out the interaction.message and it shows the message Object, but the function can not be called. I am using the interactionCreate event.

Thanks in advance!

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can use the interaction.update() method:

// send a message

message.channel.send({ embeds: [embed], components: [buttons] })

/*
listen for the "interactionCreate" event or use any other method
of detecting an interaction like interaction collectors or awaitMessageComponent 
*/

client.on("interactionCreate", (interaction) => {
    interaction.update({ embeds: [aDifferentEmbed] })
})
about 4 years ago · Juan Pablo Isaza 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