mirror of
https://github.com/danbulant/discord.js
synced 2026-05-26 05:22:15 +00:00
Merge pull request #266 from Programmix/indev
Voice State Update crash fix (different from other one)
This commit is contained in:
commit
78edc3b371
4 changed files with 2 additions and 4 deletions
|
|
@ -250,7 +250,6 @@ var InternalClient = (function () {
|
|||
var leave = function leave(connection) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
connection.destroy();
|
||||
_this3.voiceConnections.remove(connection);
|
||||
resolve();
|
||||
});
|
||||
};
|
||||
|
|
@ -280,7 +279,6 @@ var InternalClient = (function () {
|
|||
// preserve old functionality for non-bots
|
||||
if (this.voiceConnections[0]) {
|
||||
this.voiceConnections[0].destroy();
|
||||
this.voiceConnections.remove(this.voiceConnections[0]);
|
||||
}
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ var VoiceConnection = (function (_EventEmitter) {
|
|||
self_deaf: false
|
||||
}
|
||||
});
|
||||
this.client.internal.voiceConnections.remove(this);
|
||||
};
|
||||
|
||||
VoiceConnection.prototype.stopPlaying = function stopPlaying() {
|
||||
|
|
|
|||
|
|
@ -180,7 +180,6 @@ export default class InternalClient {
|
|||
var leave = (connection) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
connection.destroy();
|
||||
this.voiceConnections.remove(connection);
|
||||
resolve();
|
||||
});
|
||||
};
|
||||
|
|
@ -210,7 +209,6 @@ export default class InternalClient {
|
|||
// preserve old functionality for non-bots
|
||||
if (this.voiceConnections[0]) {
|
||||
this.voiceConnections[0].destroy();
|
||||
this.voiceConnections.remove(this.voiceConnections[0])
|
||||
}
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ export default class VoiceConnection extends EventEmitter {
|
|||
}
|
||||
}
|
||||
);
|
||||
this.client.internal.voiceConnections.remove(this);
|
||||
}
|
||||
|
||||
stopPlaying() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue