diff --git a/src/webrtc/events/Message.ts b/src/webrtc/events/Message.ts
index 8f75a815..38676f6c 100644
--- a/src/webrtc/events/Message.ts
+++ b/src/webrtc/events/Message.ts
@@ -7,13 +7,14 @@ const PayloadSchema = {
op: Number,
$d: new Tuple(Object, Number), // or number for heartbeat sequence
$s: Number,
- $t: String
+ $t: String,
};
export async function onMessage(this: WebSocket, buffer: Buffer) {
try {
var data: Payload = JSON.parse(buffer.toString());
- if (data.op !== VoiceOPCodes.IDENTIFY && !this.user_id) return this.close(CLOSECODES.Not_authenticated);
+ if (data.op !== VoiceOPCodes.IDENTIFY && !this.user_id)
+ return this.close(CLOSECODES.Not_authenticated);
// @ts-ignore
const OPCodeHandler = OPCodeHandlers[data.op];
@@ -25,7 +26,11 @@ export async function onMessage(this: WebSocket, buffer: Buffer) {
return;
}
- if (![VoiceOPCodes.HEARTBEAT, VoiceOPCodes.SPEAKING].includes(data.op as VoiceOPCodes)) {
+ if (
+ ![VoiceOPCodes.HEARTBEAT, VoiceOPCodes.SPEAKING].includes(
+ data.op as VoiceOPCodes,
+ )
+ ) {
// @ts-ignore
console.log("[WebRTC] Opcode " + VoiceOPCodes[data.op]);
}
@@ -35,4 +40,4 @@ export async function onMessage(this: WebSocket, buffer: Buffer) {
console.error("[WebRTC] error", error);
// if (!this.CLOSED && this.CLOSING) return this.close(CloseCodes.Unknown_error);
}
-}
\ No newline at end of file
+}
|