Clear the select menu options.
I want to clear the select menu options when the bot logs the role to the DB.
62 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 OPupdate the message with the same components
currently i thought to just update the components so I did so below:
I did that and it still doesnt clear
so
not sure what to do here lol
@treble/luna sorry for the ping but did I do this correctly?
does that code run? and what happens if you actually use the same components
yes it runs, its a multi file handler. idk what you mean by same components?
the ones attached to the message
oh like getting the embed
but getting the components?
:property: Message#components
[email protected]
An array of action rows in the message. This property requires the GatewayIntentBits.MessageContent privileged intent in a guild for messages that do not mention the client.its a slash command so what would that doc be
.update doesnt exist on a slash command
it only exists on component interactions
so does the message
:property: RoleSelectMenuInteraction#message
[email protected]
The message to which the component was attachedok thx!
i will look at this
any other ideas
i didnt see anything in those docs
Unknown Userā¢2mo ago
Message Not Public
Sign In & Join Server To View
just an answer to how to do this
Unknown Userā¢2mo ago
Message Not Public
Sign In & Join Server To View
right
Unknown Userā¢2mo ago
Message Not Public
Sign In & Join Server To View
I tried that
Didn't work.
Unknown Userā¢2mo ago
Message Not Public
Sign In & Join Server To View
ok one se
sec
I had removed it
lemme get a recording of it
ok
so
the code is above, the screen rec of the command being ran is below
im very confused as to why it doesnt work for me
Unknown Userā¢2mo ago
Message Not Public
Sign In & Join Server To View
ActionRowBuilder.from()
Unknown Userā¢2mo ago
Message Not Public
Sign In & Join Server To View
yes i js found that todat
and i js pass that into the components?
Unknown Userā¢2mo ago
Message Not Public
Sign In & Join Server To View
lemme test it
That code didn't work
It still doesn't blank the menu
Unknown Userā¢2mo ago
Message Not Public
Sign In & Join Server To View
c\it didn't work
it said a discord error: invalid form body
cuz it has more then 1 row
Unknown Userā¢2mo ago
Message Not Public
Sign In & Join Server To View
ok
Unknown Userā¢2mo ago
Message Not Public
Sign In & Join Server To View
error:
Unknown Userā¢2mo ago
Message Not Public
Sign In & Join Server To View
i did that in the one above
the one that worked was me doing the
ActionRowBuilder.from(components[0])
its fine
i am being a bit difficult when it comes to this so i apologize
its just annoying trying js about everything i can think of and nothing happening lolUnknown Userā¢2mo ago
Message Not Public
Sign In & Join Server To View
ok thanks!!
i promise i am a decent dev
Unknown Userā¢2mo ago
Message Not Public
Sign In & Join Server To View
no
you mean this code?
Unknown Userā¢2mo ago
Message Not Public
Sign In & Join Server To View
no i did not
Unknown Userā¢2mo ago
Message Not Public
Sign In & Join Server To View
yes
Unknown Userā¢2mo ago
Message Not Public
Sign In & Join Server To View
ActionRowBuilder.from(components[0])
?Unknown Userā¢2mo ago
Message Not Public
Sign In & Join Server To View
same thing
you dont have any default selected roles set eiter?
Unknown Userā¢2mo ago
Message Not Public
Sign In & Join Server To View
no
all good mate
i vaguely remember this being an issue with role select menus
i am doing a channel one for testing though
or well, channel select menus too
ok
all non string selects
they just don't clear?
is it a discord bug?
Unknown Userā¢2mo ago
Message Not Public
Sign In & Join Server To View
dont think this behaviour is documented anywhere at all
so like it just isn't supposed to clear
lol thats odd.
refreshing your discord client should clear it though
right, changing the channel does
its just a quality of life thing for users ig
but anyways, thanks!
it is discord thought correct/
not like discord.js and such
anyways thanks for trying!