From 0a09abbbfadbdd38781e633cf9858d8e7b795866 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sat, 31 Dec 2022 12:00:00 +1100 Subject: Add WS_LOGEVENTS and WS_VERBOSE env vars --- src/gateway/events/Message.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gateway/events/Message.ts') 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 -- cgit 1.4.1