How to update a message after the interaction with a component without using a component collector.

I have a log member sistem that sends a message with a webhook when a member joins the server. This message has a button attached to it, and when this button is activated a modal is shown. i want to update the message (more specifically only the label of the button) when this modal is submitted. How do i do this without using a component collector for the button? (i have a component handler)
9 Replies
d.js toolkit
d.js toolkit13mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
d.js docs
d.js docs13mo ago
method ButtonInteraction#update() Updates the original message of the component on which the interaction was received on.
Massicraft
MassicraftOP13mo ago
But doing like this i am able to update the message when the button is activated not when the modal is submitted
d.js docs
d.js docs13mo ago
method ModalSubmitInteraction#update() Updates the original message of the component on which the interaction was received on.
Massicraft
MassicraftOP13mo ago
ok ty it works how do i do if i want to reply to the modal and then update the message? or update the message and the reply it’s the same
Syjalo
Syjalo13mo ago
I don't think you can. .update() and then .followUp()
Massicraft
MassicraftOP13mo ago
i mean .update() and then .reply() but i have the interaction already replied error
Syjalo
Syjalo13mo ago
You can send the initial response only once. .update() and .reply() both sends initial response. After the initial response you can use .followUp()
Massicraft
MassicraftOP13mo ago
ok
Want results from more Discord servers?
Add your server