Discord-Bot 没有加入我的语音频道
Discord-Bot is not joining my voicechannel
当我调用 joinVoiceChannel() 函数时,我的 discord 机器人没有加入语音通道。也没有错误消息或其他错误消息。
const connection = joinVoiceChannel(
{
channelId: msg.member.voice.channel,
guildId: msg.member.voice.guild.id,
adapterCreator: msg.member.voice.guild.voiceAdapterCreator
});
这应该有效:
const { joinVoiceChannel } = require('@discordjs/voice');
const connection = joinVoiceChannel({
channelId: channel.id,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator,
});
当我调用 joinVoiceChannel() 函数时,我的 discord 机器人没有加入语音通道。也没有错误消息或其他错误消息。
const connection = joinVoiceChannel(
{
channelId: msg.member.voice.channel,
guildId: msg.member.voice.guild.id,
adapterCreator: msg.member.voice.guild.voiceAdapterCreator
});
这应该有效:
const { joinVoiceChannel } = require('@discordjs/voice');
const connection = joinVoiceChannel({
channelId: channel.id,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator,
});