#Button Question
1 messages · Page 1 of 1 (latest)
you can!
How can you?
you simply set a timeout and set your button as disabled once the timeout is reached
setTimeout(() => edit(), timeInMilliseconds)
Oh cool! I'll test that rn! Thanks for your help @pearl pagoda
np!
@pearl pagoda I'm kinda stuck, could you give me an example of how I should do this?
I'm new to coding 😄
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)