Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

259
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!