Show modal and remove previous ephemeral
Hi, I have a flow with my bot where the following steps are taken:
1) A user clicks a button on a bot's message
2) Bot responds with an ephemeral message with additional buttons
3) User clicks a button on ephemeral and modal appears
4) User submits modal, bot responds with a final ephemeral
This is working great, however -- I would like for the ephemeral message from step 2 to be removed when the modal is opened.
I have tried to call
interaction.deleteReply
prior to interaction.showModal
but this does not work, and I just get "Interaction Failed". And it seems like during the modalSubmit
phase in step 4, the context of the original ephemeral from step 2 is lost and I cannot find a way to remove it then either.
I have it working without the modal, where I can simply update the ephemeral message from step 2 with the final ephemeral message. But it doesn't seem like there is like an interaction.updateWithModal
action that can be taken.4 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
You can’t delete ephemeral messages. I would recommend the method of
interaction.editReply
.Thanks for the info