How does one temporarily disable a Button?

So I have a command that pretty much lets the user press a button, it then does something. However, I don't want them to be able to spam it. Can it just be temporarily greyed out for 5 seconds before allowing them to press it?
2 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Syjalo
Syjalo2y ago
You can use a message component collector. Check the last collected interaction created timestamp. collector.collected.last().createdTimestamp And reply based on that timestamp and Date.now().