mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
This commit is contained in:
parent
41d0f25d0f
commit
384fdf8f17
1 changed files with 3 additions and 0 deletions
|
|
@ -301,6 +301,9 @@ class VoiceConnection extends EventEmitter {
|
|||
*/
|
||||
disconnect() {
|
||||
this.emit('closing');
|
||||
clearTimeout(this.connectTimeout);
|
||||
const conn = this.voiceManager.connections.get(this.channel.guild.id);
|
||||
if (conn === this) this.voiceManager.connections.delete(this.channel.guild.id);
|
||||
this.sendVoiceStateUpdate({
|
||||
channel_id: null,
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue