mirror of
https://github.com/danbulant/discord.js
synced 2026-06-10 02:02:40 +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() {
|
disconnect() {
|
||||||
this.emit('closing');
|
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({
|
this.sendVoiceStateUpdate({
|
||||||
channel_id: null,
|
channel_id: null,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue