mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix(WebSocketConnection): stringify data when no websocket is available
[object Object] is not really descriptive
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user