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

256
Visualizações
Discord.js interaction won't update

I have a message with 3 buttons and I want to disable all 3 of the buttons after they have been clicked.

handle: async function(interaction) {

        interaction.deferUpdate();

        let components = interaction.message.components[0].components.forEach(c => {
            c.setDisabled(true)
        })

        await interaction.message.edit({embeds: interaction.message.embeds, components: components})
        // Do some other stuff
}

I have tried it with 

interaction.update()

and multiple other ways but i can't get it to work.
about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

After you deferred your reply with .deferReply() or .deferUpdate() you need to use .editReply()

Code @ discordjs.guide

collector.on('collect', async i => {
    if (i.customId === 'primary') {
        await i.deferUpdate();
        await wait(4000);
        await i.editReply({ content: 'A button was clicked!', components: [] });
    }
});
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