mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 02:23:31 +01:00
Fixed leaving voice channels
This commit is contained in:
@@ -40,11 +40,23 @@ class VoiceConnection extends EventEmitter {
|
||||
}
|
||||
|
||||
destroy() {
|
||||
console.log("you wanted to destroy _me_?!");
|
||||
this.stopPlaying();
|
||||
if(this.KAI)
|
||||
clearInterval(this.KAI);
|
||||
this.vWS.close();
|
||||
this.udp.close();
|
||||
this.client.internal.sendWS(
|
||||
{
|
||||
op : 4,
|
||||
d : {
|
||||
guild_id : null,
|
||||
channel_id : null,
|
||||
self_mute : true,
|
||||
self_deaf : false
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
stopPlaying() {
|
||||
|
||||
Reference in New Issue
Block a user