mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 02:23:31 +01:00
Remove old uws-specific code (0.11.1 has the good stuff)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user