Disable select menu after use - interaction.update()
Hello, I want to disable a select menu after use with the interaction.update() function, because it didn't work with an interaction.message.edit().
I think it's over for me :')
6 Replies
- 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 OPI suppose that the update function is not correctly used
Hmm okey i see
I will test :p Thanks y!
So, what are differents uses of
interaction.update()
?Something like that ? I think i'm very lost
without seeing more of your code, I'd assume the message is ephemeral
this error is exactly the reason you'd prefer
interaction.update()
over interaction.message.edit()
ephemeral messages can only be edited through interactions
they cannot be edited through the normal "Edit message" endpoint
<MessageComponentInteraction>.update()
responds to the interaction by editing the component's message
<Message>.edit()
will attempt to edit the message as normal, unrelated to any interaction
especially since all interactions need responses in order to prevent the user from receiving some "The application did not respond" error, you'd definitely want to use interaction.update()
since you don't appear to be responding to it elsewhere