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

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

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 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!