mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 14:02:02 +00:00
fix(WebSocketConnection): stringify data when no websocket is available
[object Object] is not really descriptive
This commit is contained in:
parent
12e041bc2b
commit
60013b7a10
1 changed files with 2 additions and 2 deletions
|
|
@ -212,7 +212,7 @@ class WebSocketConnection extends EventEmitter {
|
|||
*/
|
||||
_send(data) {
|
||||
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
|
||||
this.debug(`Tried to send packet ${data} but no WebSocket is available!`);
|
||||
this.debug(`Tried to send packet ${JSON.stringify(data)} but no WebSocket is available!`);
|
||||
return;
|
||||
}
|
||||
this.ws.send(this.pack(data));
|
||||
|
|
@ -225,7 +225,7 @@ class WebSocketConnection extends EventEmitter {
|
|||
*/
|
||||
send(data) {
|
||||
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
|
||||
this.debug(`Tried to send packet ${data} but no WebSocket is available!`);
|
||||
this.debug(`Tried to send packet ${JSON.stringify(data)} but no WebSocket is available!`);
|
||||
return;
|
||||
}
|
||||
this.ratelimit.queue.push(data);
|
||||
|
|
|
|||
Loading…
Reference in a new issue