Remove old uws-specific code (0.11.1 has the good stuff)

This commit is contained in:
Schuyler Cebulskie
2016-11-25 19:40:53 -05:00
parent eedc097f3f
commit c683790de7
3 changed files with 8 additions and 18 deletions

View File

@@ -72,15 +72,10 @@ class VoiceWebSocket extends EventEmitter {
* @type {WebSocket}
*/
this.ws = new WebSocket(`wss://${this.voiceConnection.authentication.endpoint}`);
if (typeof window !== 'undefined') {
this.ws.onopen = this.onOpen.bind(this);
this.ws.onerror = this.onError.bind(this);
} else {
this.ws.on('open', this.onOpen.bind(this));
this.ws.on('error', this.onError.bind(this));
}
this.ws.onopen = this.onOpen.bind(this);
this.ws.onmessage = this.onMessage.bind(this);
this.ws.onclose = this.onClose.bind(this);
this.ws.onerror = this.onError.bind(this);
}
/**