TypeError: Cannot read property 'leave' of null discord.js Как решить?

        if (message.content == 'r!stop') {

            if (message.content == 'r!stop' && message.guild.me.voice.channel !== undefined) {
                // check if the bot is connected to a voice channel
                  message.guild.me.voice.channel.leave();
                  message.reply("I have successfully left the voice channel!");
                } else {
                  message.reply("I'm not connected to a voice channel!");
                }
              }

Как решить?


Ответы (0 шт):