【发布时间】:2021-04-18 11:08:13
【问题描述】:
在输入命令movemepls 后(并且假设输入命令的人在语音频道中),它会将同一语音呼叫中的每个成员移动到不同的语音呼叫。到目前为止,我已经尝试使用各种代码,但我不确定如何返回给定 vc 中的每个成员(输入命令的人)
-
如何检查输入命令的人是否在语音通话中?
-
如何返回给定VC中的所有成员?
-
如何将所有成员批量移动到新的给定频道?
bot.on("message", msg => {
if (msg.content === 'movemepls') {
voice_channel = '768348175437922324'
msg.member.voice.setChannel('insert channelID here')
voice_channel.members.forEach(function (guildMember, guildMemberId) {
console.log(guildMemberId, guildMember.user.username);
})
}
})
【问题讨论】:
-
你环顾四周了吗?因为我找到了一些:stackoverflow.com/questions/62637725/… 和 stackoverflow.com/questions/62378011/…
标签: javascript node.js discord discord.js bots