ZakariaX🍃
ZakariaX🍃
DIAdiscord.js - Imagine an app
Created by ZakariaX🍃 on 5/14/2025 in #djs-questions
Disable button on "end"
Heyo, I hope this is a quick one: I have a leaderboard with a couple buttons for navigation and toggling some properties for that board. In order to change those properties I need to update the LB after each interaction, so it goes through an interaction.on('collect', ... to update meaning the buttons can't be in scope when it reaches the interaction.on('end', ... block. What options do I have to disable the buttons when the interaction "expires" so users don't try to click the button of an expired message? (Perhaps a built in discordJS feature, or can I get and update the button using its ID?)
7 replies