Minor inconsistencies

This commit is contained in:
abalabahaha
2016-03-12 21:21:59 -08:00
parent 14fffb12af
commit 13e8a39f9f
4 changed files with 47 additions and 38 deletions

View File

@@ -78,7 +78,9 @@ var VoiceConnection = (function (_EventEmitter) {
VoiceConnection.prototype.destroy = function destroy() {
this.stopPlaying();
if (this.KAI) clearInterval(this.KAI);
if (this.KAI) {
clearInterval(this.KAI);
}
this.vWS.close();
this.udp.close();
this.client.internal.sendWS({
@@ -350,7 +352,7 @@ var VoiceConnection = (function (_EventEmitter) {
}
discordPort = msg.readUIntLE(msg.length - 2, 2).toString(10);
var wsDiscPayload = {
vWS.send(JSON.stringify({
"op": 1,
"d": {
"protocol": "udp",
@@ -360,8 +362,7 @@ var VoiceConnection = (function (_EventEmitter) {
"mode": self.vWSData.modes[0] //Plain
}
}
};
vWS.send(JSON.stringify(wsDiscPayload));
}));
firstPacket = false;
}
});