Discord.js I';我很难将已经在一个语音频道中的用户移动到另一个语音频道

Discord.js I';我很难将已经在一个语音频道中的用户移动到另一个语音频道,discord.js,Discord.js,错误 TypeError:member.setVoiceChannel不是函数 我以前使用过setVoiceChannel,不知道为什么它对我不起作用如果您使用的是discord.js v12,您应该改为使用它 member.voice.setChannel(chan); 您可以阅读有关语音状态的更多信息感谢您的快速响应!通过这段代码,我得到了“TypeError:无法读取未定义的属性'setChannel'”也为noob的问题感到抱歉:您使用的是哪个版本的discord.js?我在v12.1

错误 TypeError:member.setVoiceChannel不是函数
我以前使用过setVoiceChannel,不知道为什么它对我不起作用

如果您使用的是discord.js v12,您应该改为使用它

member.voice.setChannel(chan);

您可以阅读有关语音状态的更多信息

感谢您的快速响应!通过这段代码,我得到了“TypeError:无法读取未定义的属性'setChannel'”也为noob的问题感到抱歉:您使用的是哪个版本的discord.js?我在v12.18.4上。当查找成员时可能出现问题,您可以尝试使用ID查找它吗?将我的代码更改为-“const member=client.users.cache.find”(user=>user.id==“259466508814516224”);“提供了正确的成员,但也有相同的错误
else if (command === 'move'){
        const member = client.users.cache.find(user => user.username == "0.o");
        const chan = client.channels.cache.get('761321016760336444');
        member.setVoiceChannel(chan);