#Deselection the option in select menu

22 messages · Page 1 of 1 (latest)

uncut swan
#

hi, how do I uncheck the option after an interaction?

civic hatchBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • 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
still halo
#

Update the message with a new instance of the same SelectMenu

uncut swan
#

could you give me an example?

still halo
#

<StringSelectMenuInteraction>.update({components: [row]}) where row is what you sent in the first place when you sent the menu

uncut swan
#

ahhh ok, thx

#

i try

uncut swan
still halo
#

What happens in discord app? Because it looks like you already replied to the interaction somewhere else

uncut swan
#

i have 2 interaction with this id, the update and open modal

still halo
#

That’s a bad idea then, at least if you don’t also check the interaction type (which you don’t in the file you showed)

uncut swan
#

Could you recommend me an efficient way to do this?

still halo
#

Either do the .update on the ModalSubmitInteraction or use interaction.message.edit instead after the showModal

uncut swan
#

this?

ModalSubmitInteraction.update();
interaction.message.edit();
interaction.showModal(modal);

still halo
#

Umm, no. When the modal gets submitted you receive a new interaction. That would be a ModalSubmitInteraction. You can .update that then if you want to edit the original message. or use interaction.message.edit after the showModal call

uncut swan
#

Please give me the example, my brain explodes

still halo
#

For what? And I read it the first time. But nobody’s obligated to answer you. #how-to-get-help

uncut swan