mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 12:33:30 +01:00
This commit is contained in:
@@ -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,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user