help with buttons
is it possible for the bot to send another message after clicking a URL style button?
33 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.if you put message's url probably yes
so would i need to put the url instead of the customId since theyre the same
customId's for button click events
if you want it to redirect to somewhere or to a message customId will not helpful for your situation
yea ik, after clicking a url button itll take me to the site, but im wondering if it can also edit the initial embed after clicking
i didnt used link buttons but i think it will work same as normal button interactions
you can check interaction.type to button interaction
and interaction.customId for button's id
then change embed
okay thanks
also, @flexyz. is it possible to make a command that sets a tag of a thread?
ThreadChannel#setAppliedTags()
Set the applied tags for this channel (only applicable to forum threads)
do i just do channel.setAppliedTags
or is there a certain way of getting a thread type channel
If you don't mind me asking why do you want a url style button rather than secondary
Oh sorry
I didn't see you mention that
i didnt understand
huh?
if you want to set a tag for a thread channel
just channel.setAppliedTags()
i want a link style so i can get sent to top gg website but i also want the embed to change into a new one after clicking the button
then just the tag id?
its takes array of ids
['id']
👍.
oh yea yea
ty
So incase what @flexyz. Said doesn't work, the more complicated answer would be having it first link to your own website or server which sends a http request to your bot saying that the button's been pressed, and redirecting the user to top gg
oh man
lol
i think link buttons interaction should be work
Yeah that would be the easiest if it does
But I've never tried it before
When will someone reply to my post, sorry for asking it here
can u send me a link or example
in your interactioncreate event
Link buttons do not have a customid and will not trigger an interactionCreate event
really?
damn
Yeah then ^ this would be the alternative
yeah
yea thats why, link button and custom id are the same
no they are not. Link buttons do not have a customid, just a url
yes im saying it is basically the same, as in you cant use both a link button and a customid button.
when i click the buttons, they do what theyre supposed to but it still shows interaction failed?
Are you comfortable with showing the code `?
what i coded the button to do was show commands from a certain folder. that works but i still get the interaction failed
i figured it out thank you