📌  相关文章
📜  如何获取discord js中的所有语音通道 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:03:59.398000             🧑  作者: Mango

代码示例1
if (message.member.permissions.missing('ADMINISTRATOR')) return;

const channels = message.guild.channels.filter(c => c.parentID === '497908108803440653' && c.type === 'voice');

for (const [channelID, channel] of channels) {
  for (const [memberID, member] of channel.members) {
    member.setVoiceChannel('497910775512563742')
      .then(() => console.log(`Moved ${member.user.tag}.`))
      .catch(console.error);
  }
}