Tengo un mensaje con 3 botones y quiero desactivar los 3 botones después de hacer clic en ellos.
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 withinteracción.update()
and multiple other ways but i can't get it to work.Después de diferir su respuesta con .deferReply() o .deferUpdate() , debe usar .editReply()
Código @ 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: [] }); } });