Update interaction on Modal Submit

I can't call interaction.update() after I received a ModalSubmitInteraction. After I send a command, the bot replies with a button. After clicking the button, I call ButtonInteraction.showModal(). I want to call ButtonInteraction.update() upon modal submit, but there seems to be no proper way to do it (I am trying to change text on the button received from the modal submit). Are there any workarounds for this?
14 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs3y ago
method ModalSubmitInteraction#update() Updates the original message of the component on which the interaction was received on.
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
deminearchiver
deminearchiverOP3y ago
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
deminearchiver
deminearchiverOP3y ago
I am using DEV
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
deminearchiver
deminearchiverOP3y ago
DiscordJS 14
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
deminearchiver
deminearchiverOP3y ago
It still doesn't like it though
chewie
chewie3y ago
Yeah, seems to be missing from the typings can you use it after using the isFromMessage() typeguard?
deminearchiver
deminearchiverOP3y ago
Well, it is not from a message, but from a button But the button is attached to a command reply
chewie
chewie3y ago
a button is on what? a message.
deminearchiver
deminearchiverOP3y ago
Oh yes Let me try It works! Thank you!
Want results from more Discord servers?
Add your server