mirror of
https://github.com/danbulant/discord.js
synced 2026-09-20 06:53:53 +00:00
fixed voice intervals not dying, bot will now fully die on close
This commit is contained in:
parent
e072c58460
commit
706682af55
2 changed files with 6 additions and 0 deletions
|
|
@ -1139,6 +1139,9 @@ var InternalClient = (function () {
|
||||||
self.state = _ConnectionState2["default"].DISCONNECTED;
|
self.state = _ConnectionState2["default"].DISCONNECTED;
|
||||||
client.emit("disconnected");
|
client.emit("disconnected");
|
||||||
self.cleanIntervals();
|
self.cleanIntervals();
|
||||||
|
if (self.voiceConnection) {
|
||||||
|
self.leaveVoiceChannel();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.websocket.onerror = function (e) {
|
this.websocket.onerror = function (e) {
|
||||||
|
|
|
||||||
|
|
@ -1030,6 +1030,9 @@ export default class InternalClient {
|
||||||
self.state = ConnectionState.DISCONNECTED;
|
self.state = ConnectionState.DISCONNECTED;
|
||||||
client.emit("disconnected");
|
client.emit("disconnected");
|
||||||
self.cleanIntervals();
|
self.cleanIntervals();
|
||||||
|
if(self.voiceConnection){
|
||||||
|
self.leaveVoiceChannel();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.websocket.onerror = e => {
|
this.websocket.onerror = e => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue