Can `.addChannelOption()` take more than 1 channels as input?

I have a discord bot for creating breakout rooms. It has 2 main slash commands: 1. create breakout rooms (voice channels) 2. move members from the main room to the breakout rooms. I have a problem with the 2nd slash command, which takes 2 input: the main room and the breakout rooms. It seems that .addChannelOption() can only take 1 input, so I have to create multiple .addChannelOption(), which is cumbersome from the user's perspective. (screenshot 1). What I want is a single .addChannelOption() that can take more than 1 channels. So, after the user clicked the 'breakout-rooms' option, the user can simply spam click on the suggested voice channels (screenshot 2). But that doesn't seem to be possible (or is it?). Is there a way around it? Source code containing the current and desired code: https://pastebin.com/Q1cC5Xjc
Pastebin
// Current:export default { data: new SlashCommandBuilder() .se...
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.
No description
No description
10 Replies
d.js toolkit
d.js toolkit21h 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!
invictus
invictusOP21h ago
discord.js: [email protected] node: v23.7.0
Louis
Louis20h ago
it can't
invictus
invictusOP20h ago
ahh, that's unfortunate
Louis
Louis20h ago
maybe try a channel select menu instead
invictus
invictusOP20h ago
what's that?
Louis
Louis20h ago
you can specify up to 25 channels it's a message component
invictus
invictusOP20h ago
ohhh
Louis
Louis20h ago
for example, this is string select menu
No description
Louis
Louis20h ago
and discord has channel select menu, you can also specific max choices for multiple channel selections

Did you find this page helpful?