如标题中所述,我似乎无法让我的机器人加入我不和谐的语音频道。该命令的代码:
_commands.CreateCommand("join")
.Description("Makes the bot join the first or default voice channel.")
.Do(async (e) =>
{
await e.Channel.SendIsTyping();
var voiceChannel = _client.FindServers("mealroom V2").FirstOrDefault().VoiceChannels.FirstOrDefault(); // Finds the first VoiceChannel on the server 'Music Bot Server'
var _vClient = await _client.GetService<AudioService>() // We use GetService to find the AudioService that we installed earlier. In previous versions, this was equivelent to _client.Audio()
.Join(VoiceChannel); // Join the Voice Channel, and return the IAudioClient.
});
我正在使用 discord.Net 0.9.6。
任何帮助将不胜感激,谢谢!
PS我有Iaudio代码:
_client.UsingAudio(x =>
{
x.Mode = AudioMode.Outgoing;
});