6 files changed, 5 insertions, 3 deletions
diff --git a/gateway/src/util/Constants.ts b/src/gateway/util/Constants.ts
index 692f9028..692f9028 100644
--- a/gateway/src/util/Constants.ts
+++ b/src/gateway/util/Constants.ts
diff --git a/gateway/src/util/Heartbeat.ts b/src/gateway/util/Heartbeat.ts
index f6871cfe..f6871cfe 100644
--- a/gateway/src/util/Heartbeat.ts
+++ b/src/gateway/util/Heartbeat.ts
diff --git a/gateway/src/util/Send.ts b/src/gateway/util/Send.ts
index c8627b03..2a28d8e0 100644
--- a/gateway/src/util/Send.ts
+++ b/src/gateway/util/Send.ts
@@ -1,4 +1,4 @@
-var erlpack: any;
+let erlpack: any;
try {
erlpack = require("@yukikaze-bot/erlpack");
} catch (error) {
@@ -7,6 +7,8 @@ try {
import { Payload, WebSocket } from "@fosscord/gateway";
export async function Send(socket: WebSocket, data: Payload) {
+ if(process.env.WS_VERBOSE)
+ console.log(`[Websocket] Outgoing message: ${JSON.stringify(data)}`);
let buffer: Buffer | string;
if (socket.encoding === "etf") buffer = erlpack.pack(data);
// TODO: encode circular object
diff --git a/gateway/src/util/SessionUtils.ts b/src/gateway/util/SessionUtils.ts
index bf854042..bf854042 100644
--- a/gateway/src/util/SessionUtils.ts
+++ b/src/gateway/util/SessionUtils.ts
diff --git a/gateway/src/util/WebSocket.ts b/src/gateway/util/WebSocket.ts
index e3313f40..9496da85 100644
--- a/gateway/src/util/WebSocket.ts
+++ b/src/gateway/util/WebSocket.ts
@@ -8,8 +8,8 @@ export interface WebSocket extends WS {
session_id: string;
encoding: "etf" | "json";
compress?: "zlib-stream";
- shard_count?: bigint;
- shard_id?: bigint;
+ shard_count?: number;
+ shard_id?: number;
deflate?: Deflate;
heartbeatTimeout: NodeJS.Timeout;
readyTimeout: NodeJS.Timeout;
diff --git a/gateway/src/util/index.ts b/src/gateway/util/index.ts
index 0be5ecee..0be5ecee 100644
--- a/gateway/src/util/index.ts
+++ b/src/gateway/util/index.ts
|