我希望看到这个奇怪的错误,而且我不知道如何解决。
await userName.ModifyAsync(x =>
{
x.Channel = Program.client.GetChannel(588025239103995904) as IVoiceChannel;
});
无法将类型
Discord.IVoiceChannel
隐式转换为Discord.Optional<Discord.IVoiceChannel>
答案 0 :(得分:0)
创建一个Optional<T>
:
await user.ModifyAsync(x =>
{
var voiceChannel = Program.client.GetChannel(588025239103995904) as IVoiceChannel;
x.Channel = Optional.Create(voiceChannel);
});