C# 不一致移动其他通道中的用户

C# 不一致移动其他通道中的用户,c#,discord,C#,Discord,我尝试将用户移动到另一个频道。因此,我使用了user.ModifyAsync。但服务器的响应错误为400:BadRequest-reply 我的代码是: private async void move_user(SocketGuildUser user, ulong new_channel) { await user.ModifyAsync(x=> { x.ChannelId = new_channel; }); } 我用最新的discord.net nu

我尝试将用户移动到另一个频道。因此,我使用了user.ModifyAsync。但服务器的响应错误为400:BadRequest-reply

我的代码是:

private async void move_user(SocketGuildUser user, ulong new_channel)
    {
        await user.ModifyAsync(x=> { x.ChannelId = new_channel; });
    }

我用最新的discord.net nuget软件包试用了它。

代码的可能副本似乎是正确的。您可能会收到该错误,因为用户当前不在语音频道中。如果用户不在一个语音频道中,则无法将其添加到语音频道,只有在用户已连接后,才能将其移动到另一个语音频道。