summary refs log tree commit diff
path: root/src/gateway/events/Message.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/gateway/events/Message.ts')
-rw-r--r--src/gateway/events/Message.ts15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/gateway/events/Message.ts b/src/gateway/events/Message.ts
index 52d9edd8..8415d04e 100644
--- a/src/gateway/events/Message.ts
+++ b/src/gateway/events/Message.ts
@@ -60,22 +60,15 @@ 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)}`);
+	if (process.env.WS_VERBOSE) console.log(`[Websocket] Incomming message: ${JSON.stringify(data)}`);
 
 	if (process.env.WS_DUMP) {
 		const id = this.session_id || "unknown";
 
 		await fs.mkdir(path.join("dump", id), { recursive: true });
-		await fs.writeFile(
-			path.join("dump", id, `${Date.now()}.in.json`),
-			JSON.stringify(data, null, 2),
-		);
+		await fs.writeFile(path.join("dump", id, `${Date.now()}.in.json`), JSON.stringify(data, null, 2));
 
-		if (!this.session_id)
-			console.log(
-				"[Gateway] Unknown session id, dumping to unknown folder",
-			);
+		if (!this.session_id) console.log("[Gateway] Unknown session id, dumping to unknown folder");
 	}
 
 	check.call(this, PayloadSchema, data);
@@ -102,7 +95,7 @@ export async function Message(this: WebSocket, buffer: WS.Data) {
 				const ret = await OPCodeHandler.call(this, data);
 				Sentry.setUser({ id: this.user_id });
 				return ret;
-			},
+			}
 		);
 	} catch (error) {
 		Sentry.captureException(error, {