mirror of
https://github.com/danbulant/discord.js
synced 2026-05-24 20:42:27 +00:00
parent
91a69fb761
commit
0008a18deb
1 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue