类型错误:无法读取未定义的 discord.js 的属性“通道”

时间:2021-05-02 17:47:44

标签: javascript discord.js

所以我尝试使用 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);
        }
    }
}

0 个答案:

没有答案