How can I kick member from voice channel?
In DSharpplus Api Documentation I've only found Task PlaceMemberAsync(DiscordMember Member)
or public Task PlaceInAsync(DiscordChannel channel)
await Member.PlaceInAsync(null)
doesn't work
https://dsharpplus.emzi0767.com/api/index.html
Thank's for your answer's
问问题
539 次
2 回答
1
来自https://dsharpplus.emzi0767.com/api/DSharpPlus.Entities.DiscordMember.html
有一种方法“ModifyAsync(String, IEnumerable, Nullable, Nullable, DiscordChannel, String)”
修改目标用户时是否尝试过将 DiscordChannel 参数设为空?首先使用https://dsharpplus.emzi0767.com/api/DSharpPlus.ChannelType.html检查它是否是语音通道。
于 2020-10-13T14:05:40.890 回答
-1
现在你需要使用
await Member.ModifyAsync(delegate (MemberEditModel Kick)
{
Kick.VoiceChannel = null;
});
于 2020-10-13T18:18:46.493 回答