summary refs log tree commit diff
path: root/src/gateway
diff options
context:
space:
mode:
Diffstat (limited to 'src/gateway')
-rw-r--r--src/gateway/events/Message.ts21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/gateway/events/Message.ts b/src/gateway/events/Message.ts
index e8cbe964..07a4e2a9 100644
--- a/src/gateway/events/Message.ts
+++ b/src/gateway/events/Message.ts
@@ -1,23 +1,16 @@
-import { CLOSECODES, OPCODES } from "../util/Constants";
-import { WebSocket, Payload } from "@fosscord/gateway";
-var erlpack: any;
-try {
-	erlpack = require("@yukikaze-bot/erlpack");
-} catch (error) {}
+import { WebSocket, Payload, CLOSECODES, OPCODES } from "@fosscord/gateway";
 import OPCodeHandlers from "../opcodes";
-import { Tuple } from "lambert-server";
 import { check } from "../opcodes/instanceOf";
 import WS from "ws";
-import BigIntJson from "json-bigint";
+import { PayloadSchema } from "@fosscord/util";
 import * as Sentry from "@sentry/node";
+import BigIntJson from "json-bigint";
 const bigIntJson = BigIntJson({ storeAsString: true });
 
-const PayloadSchema = {
-	op: Number,
-	$d: new Tuple(Object, Number), // or number for heartbeat sequence
-	$s: Number,
-	$t: String,
-};
+var erlpack: any;
+try {
+	erlpack = require("@yukikaze-bot/erlpack");
+} catch (error) { }
 
 export async function Message(this: WebSocket, buffer: WS.Data) {
 	// TODO: compression