Adding a list of users as an option to a command

If there are 10 users in a channel and I want to not include some of them in some command, i.e. team generation, /random -dontinclude @user1 @user2 @user3, is this possible? Will a stringOption accept a list of users as an input or does it have to be strictly strings?
8 Replies
d.js toolkit
d.js toolkit2w ago
Amgelo
Amgelo2w ago
strictly strings you can use a select menu instead though and then you'll be able to choose which users they can select, with a string select menu or you can use a string option with autocompletable choices so you can autocomplete the users but that'd be kinda hard to implement
sb
sbOP2w ago
Hmm, I’ll try implement some stuff and see how it goes But maybe an idea for future releases?
Amgelo
Amgelo2w ago
you'll have to ask discord, not djs
d.js docs
d.js docs2w ago
We are not Discord, just some nerds who develop Discord bots! - /report appeals and age updates - /howtoreport reports (harassment/hacking/spam/abuse) - /support anything Discord related - /billing payment/nitro - /feedback feedback/feature requests
sb
sbOP2w ago
I’m away from pc right now so haven’t got a chance to test yet but what happens if I input @users to a string option, will it accept it? And maybe take it as the user id?
Amgelo
Amgelo2w ago
it won't autocomplete so that'd be kinda hard to do but it'll just accept what you typed if you typed @foobar you'll get "@foobar"
sb
sbOP2w ago
Ah, damn Will probably just pass in nicknames and match to users Or the place of the user in the channel -dontinclude 7 8 9

Did you find this page helpful?