#Button Question

1 messages · Page 1 of 1 (latest)

urban pine
pearl pagoda
#

you can!

urban pine
#

How can you?

pearl pagoda
#

you simply set a timeout and set your button as disabled once the timeout is reached

#

setTimeout(() => edit(), timeInMilliseconds)

urban pine
#

Oh cool! I'll test that rn! Thanks for your help @pearl pagoda

pearl pagoda
#

np!

urban pine
#

@pearl pagoda I'm kinda stuck, could you give me an example of how I should do this?

#

I'm new to coding 😄

pearl pagoda
#

sure! if you want to set a button to disabled in, let's say, 10 seconds, you would do:
setTimeout(() => message.edit({ components: [new MessageActionRow().addComponents(new MessageButton().setLabel("label").setStyle("PRIMARY").setCustomId("test").setDisabled())] }), 10000)