Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

211
Vistas
Trying to edit a reply when the button is clicked but this error pops out

I've been trying to edit my bot's reply but this error pops out:

Error [INTERACTION_NOT_REPLIED]: The reply to this interaction has not been sent or deferred.

Code:

client.on("interactionCreate", async interaction => {
    if (!interaction.isCommand){
        return
    }
    if (interaction.isButton()) {
        if(interaction.customId === 'EDIT'){
            interaction.editReply({
                content: "You clicked the button.",
                ephemeral: true
            })
        };
    }

    const { commandName, options } = interaction

    if (commandName == "button"){
        const AslashButton = new Discord.MessageActionRow().addComponents(
            new Discord.MessageButton()
            .setCustomId('EDIT')
            .setLabel('Button')
            .setStyle('PRIMARY')
            .setDisabled(false)
        );
        interaction.reply({
            content: "Button.",
            components: [AslashButton],
            ephemeral: true
        })
    };
})

I used deferReply but it replied 'TestB is thinking...'

How can I make the message deferred?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can only use followUp after you defer or reply to an interaction, and also, please check for the intents.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda