summary refs log tree commit diff
path: root/src/gateway/events/Message.ts
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-12-31 12:00:00 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-12-31 12:00:00 +1100
commit6ca65a19f2690090d5031a12e05ef657f46bcd37 (patch)
treeafe36ecbf09acc046a81fd20c3dae5a75ba0a1e4 /src/gateway/events/Message.ts
parentUpdate build workflow to use v3 checkout and setup-node (diff)
downloadserver-6ca65a19f2690090d5031a12e05ef657f46bcd37.tar.xz
Add WS_LOGEVENTS and WS_VERBOSE env vars
Diffstat (limited to '')
-rw-r--r--src/gateway/events/Message.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gateway/events/Message.ts b/src/gateway/events/Message.ts

index a88495f6..57af0c69 100644 --- a/src/gateway/events/Message.ts +++ b/src/gateway/events/Message.ts
@@ -33,6 +33,8 @@ export async function Message(this: WebSocket, buffer: WS.Data) { } else return this.close(CLOSECODES.Decode_error); + if (process.env.WS_VERBOSE) console.log(`[Websocket] Incomming message: ${JSON.stringify(data)}`); + check.call(this, PayloadSchema, data); // @ts-ignore