mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 02:53:31 +01:00
Fixed leaving voice channels
This commit is contained in:
@@ -48,10 +48,20 @@ var VoiceConnection = (function (_EventEmitter) {
|
||||
}
|
||||
|
||||
VoiceConnection.prototype.destroy = function 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
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
VoiceConnection.prototype.stopPlaying = function stopPlaying() {
|
||||
|
||||
Reference in New Issue
Block a user