more voice stuff

This commit is contained in:
Amish Shah
2016-08-23 16:59:34 +01:00
parent f38aff7523
commit 0edf838474
4 changed files with 29 additions and 2 deletions

View File

@@ -127,6 +127,7 @@ class WebSocketManager {
* @returns {null}
*/
eventClose(event) {
console.log('close', event.code);
if (event.code === 4004) {
throw Constants.Errors.BAD_LOGIN;
}
@@ -154,6 +155,8 @@ class WebSocketManager {
return this.eventError(Constants.Errors.BAD_WS_MESSAGE);
}
this.client.emit('raw', packet);
if (packet.op === 10) {
this.client.manager.setupKeepAlive(packet.d.heartbeat_interval);
}