The ability to show the balance

I made a command to show the balance by writing .setLabel on the button. But what I want is not for the balance of the person who wrote the command, but for the individual balance to be displayed differently on each screen on the button.
const button = new ButtonBuilder()
.setCutomId('balance')
.setLabel(`balance : ${balance.balance}`)
.setStyle(ButtonStyle.Secondary)
.setDisable(ture);
const button = new ButtonBuilder()
.setCutomId('balance')
.setLabel(`balance : ${balance.balance}`)
.setStyle(ButtonStyle.Secondary)
.setDisable(ture);
The balance function gets the balance of the account number from db to userid.
2 Replies
d.js toolkit
d.js toolkit•10mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Pulse
Pulse•10mo ago
if you want each person in the guild to see a different label on the button, then that's not possible the best alternative i can think of is for the button label to be "Show my balance", or something, then on interaction you could do an ephemeral reply with the balance of the user that pressed it
Want results from more Discord servers?
Add your server