DeferReply problem

Hello

I want my code to clean up components under message that button was clicked and then send new message.

i got this effect by update first and then sending followup

await interaction.update({components: []})
        await interaction.followup({content: 'This is a follow-up message.', components: [row]});


This code works as intended but when i add deferReply this code end every time with error:

Error [InteractionAlreadyReplied]: The reply to this interaction has already been sent or deferred.


Do you have idea how would i fix that?
Was this page helpful?