From f44f5d7ac2d24ff836c2e1d4b2fa58da04b13052 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sun, 25 Sep 2022 18:24:21 +1000 Subject: Refactor to mono-repo + upgrade packages --- src/gateway/util/WebSocket.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/gateway/util/WebSocket.ts (limited to 'src/gateway/util/WebSocket.ts') diff --git a/src/gateway/util/WebSocket.ts b/src/gateway/util/WebSocket.ts new file mode 100644 index 00000000..930fa78a --- /dev/null +++ b/src/gateway/util/WebSocket.ts @@ -0,0 +1,26 @@ +import { Intents, Permissions } from "@fosscord/util"; +import WS from "ws"; +import { Deflate, Inflate } from "fast-zlib"; +// import { Client } from "@fosscord/webrtc"; + +export interface WebSocket extends WS { + version: number; + user_id: string; + session_id: string; + encoding: "etf" | "json"; + compress?: "zlib-stream"; + ipAddress?: string; + shard_count?: bigint; + shard_id?: bigint; + deflate?: Deflate; + inflate?: Inflate; + heartbeatTimeout: NodeJS.Timeout; + readyTimeout: NodeJS.Timeout; + intents: Intents; + sequence: number; + permissions: Record; + events: Record; + member_events: Record; + listen_options: any; + // client?: Client; +} -- cgit 1.5.1