Slash command channel types

Is it possible for me to filter out channels that are shown in the options by type. Here's my code:
.addChannelOption(option => option
.setName('channel')
.setDescription('The channel to send the embed to')
.setRequired(true)
)
.addChannelOption(option => option
.setName('channel')
.setDescription('The channel to send the embed to')
.setRequired(true)
)
Is it possible for me to filter the channels shown to just channel types text channels and voice channels but not forum channels?
7 Replies
d.js toolkit
d.js toolkit16mo 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!
sproj003 ♿
sproj003 ♿OP16mo ago
D.JS v14.12.1
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
sproj003 ♿
sproj003 ♿OP16mo ago
Thanks. For future reference where can I find this in the documentation?
d.js docs
d.js docs16mo ago
method SlashCommandChannelOption#addChannelTypes() Adds channel types to this option
sproj003 ♿
sproj003 ♿OP16mo ago
Ah, thank you
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server