mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
committed by
Schuyler Cebulskie
parent
91a69fb761
commit
0008a18deb
@@ -81,11 +81,11 @@ class WebSocketManager extends EventEmitter {
|
||||
this.ws = new WebSocket(gateway);
|
||||
if (browser) {
|
||||
this.ws.binaryType = 'arraybuffer';
|
||||
this.ws.on('open', this.eventOpen.bind(this));
|
||||
this.ws.on('error', this.eventError.bind(this));
|
||||
} else {
|
||||
this.ws.onopen = () => this.eventOpen();
|
||||
this.ws.onerror = (e) => this.eventError(e);
|
||||
} else {
|
||||
this.ws.on('open', this.eventOpen.bind(this));
|
||||
this.ws.on('error', this.eventError.bind(this));
|
||||
}
|
||||
this.ws.onclose = (d) => this.eventClose(d);
|
||||
this.ws.onmessage = (e) => this.eventMessage(e);
|
||||
|
||||
Reference in New Issue
Block a user