Add points to multiple users at once

I want to make 3 optional options to add points to multiple users at once, How can I achieve that without adding the points to an emtpy string's balance? eg. const user2 = interaction.options.getUser("user2") ?? " "; I can think of another approach using if (user2 === " ") { //Code without adding points to user 2}; But it's not the best approach if I want to add 4-5 optinal users. https://pastebin.com/7tvYrNGp Thank You.
Pastebin
addpoints-discordjs - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
5 Replies
d.js toolkit
d.js toolkit11mo 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! - Marked as resolved by OP
Kinect3000
Kinect300011mo ago
You could send a user select menu instead And have them select the users from that
Anurag Bansal
Anurag BansalOP11mo ago
Wow, that sounds genius How would I add all of the members in a select menu? Wait lemme try
d.js docs
d.js docs11mo ago
Suggestion for @Anurag Bansal: :guide: Message Components: Select menus - Auto-populating select menus read more
Anurag Bansal
Anurag BansalOP11mo ago
Thanks!
Want results from more Discord servers?
Add your server