所以我尝试使用 discord.js 创建一个函数,该函数首先连接到我所在的语音,但我查看的每个教程都有 message.member.voice.channel,对于我的编译器来说,它是未定义的。
>module.exports = {
name: "join",
async execute(client, msg, args){
try{
const connection = await msg.member.voice.channel.join();
}
catch(err){
console.log(err);
}
}
}