discordjs / discord.js

A powerful JavaScript library for interacting with the Discord API
https://discord.js.org
Apache License 2.0
25.23k stars 3.96k forks source link

VoiceState.channel property is not changed to null when manually disconnecting bot account #5545

Closed Void0Alex closed 3 years ago

Void0Alex commented 3 years ago

Please describe the problem you are having in as much detail as possible: Whenever I manually disconnect (right-click on the bot and select the Disconnect button) the bot from the voice channel when it's playing music, discord.js thinks the bot is still in the channel. I also set an interval to log every few seconds the number of members in the voice channel. It didn't change after the bot was manually disconnected.

Include a reproducible code sample here, if possible:

bot.on("voiceStateUpdate", (oldState, newState) => {
    console.log(!!newState.channel);
});

The code logs true when the bot is manually disconnected

Further details:

Relevant client options:

Void0Alex commented 3 years ago

Nevermind lol realized the issue was with the Lavalink wrapper I'm using...