I'm trying to get a list of all the voice channels that are on the interaction server to put it on a select menu later.
You can simply use the guild object to list the channels, like so:
const { options, guild, member } = interaction;
// if you have not disabled caching
let channels = guild.channels.cache
// no cache
let channels = await guild.channels.fetch()
More info at: https://discord.js.org/#/docs/discord.js/stable/class/Guild?scrollTo=channels
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.