#how to disable a button after a certain amt of time
36 messages · Page 1 of 1 (latest)
• 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.
v14.2, node 18.7
m tryin to disble the button after 5s but it says interaction.messge... is not a function
<Interaction>.fetchReply()
doesnt work
whats your error?
Sorry, I misread your question
oop
You will need to fetch the ActionRow, then fetch the Component
yes i tried that but how do i fetch the action row
interaction.actionrow(row.setDisabled())
smth like that? sry m new to this
<Interaction>.message.components[0].components[0].setDisabled(true)
The initial components property returns an array of ActionRows
Then you find the button from that ActionRow
hm
Also, make sure you have the Message Content intent
yes i have that enabled alr lemme try
uh this is returning an undefined value and still says that its not a function
like
interaction.message.components[0].components[0]
this is returning my button
but m not able to update it
Ah. You need to override the ActionRow with a new one
So send the original action row, but with the button disabled
Then update the original interaction that sent the button
Have you read the guide by any chance?
i did but i cant figure it out
I suggest reading the edit section
mk
this is how I did it
i see