summary refs log tree commit diff
path: root/src/util/WebSocket.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/WebSocket.ts')
-rw-r--r--src/util/WebSocket.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/util/WebSocket.ts b/src/util/WebSocket.ts
new file mode 100644

index 00000000..1bd0ff2f --- /dev/null +++ b/src/util/WebSocket.ts
@@ -0,0 +1,23 @@ +import { Intents, Permissions } from "@fosscord/server-util"; +import WS, { Server, Data } from "ws"; +import { Deflate } from "zlib"; +import { Channel } from "amqplib"; + +interface WebSocket extends WS { + version: number; + user_id: string; + encoding: "etf" | "json"; + compress?: "zlib-stream"; + shard_count?: bigint; + shard_id?: bigint; + deflate?: Deflate; + heartbeatTimeout: NodeJS.Timeout; + readyTimeout: NodeJS.Timeout; + intents: Intents; + sequence: number; + rabbitCh?: Channel & { queues: Record<string, string> }; + permissions: Record<string, Permissions>; +} + +export default WebSocket; +export { Server, Data };