Modal Submit, how to edit triggering ephemeral?
If I'm triggering a modal from an ephemeral message button, is it possible to edit the original ephemeral message during modal submit? When I try
interaction.message.edit(...)
I get an error "Unknown Message". The message object seems to be populated as expected...11 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
ephemeral messages can only be edited/updated via interaction
on modal submit, you could just use
<ModalSubmitInteraction>.update()
if you aren't otherwise responding to the interaction
otherwise you could use interaction.webhook.editMessage()
Hmm, I only see
deferUpdate
as an option ModalSubmitInteraction#update()
Updates the original message of the component on which the interaction was received on.
if using ts, you may need to typeguard with
.isFromMessage()
ah
Ok great I got it working, thank you!
Hey btw secondary question -- do you know if it's possible to trigger a second modal after submitting the first?
Or would that have to be done with a second button click?
it'd have to be a second button click or otherwise separate interaction from the modal submit
Hmm how do you create a separate interaction during modal submit?
you don't
I just meant it'd have to be a button click, other component interaction, or application command
Gotcha
Thanks for your help
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View