showing results for - "how to get all the voice channels in discord js"
Niko
07 Aug 2016
1if (message.member.permissions.missing('ADMINISTRATOR')) return;
2
3const channels = message.guild.channels.filter(c => c.parentID === '497908108803440653' && c.type === 'voice');
4
5for (const [channelID, channel] of channels) {
6  for (const [memberID, member] of channel.members) {
7    member.setVoiceChannel('497910775512563742')
8      .then(() => console.log(`Moved ${member.user.tag}.`))
9      .catch(console.error);
10  }
11}