This repository has been archived on 2026-02-28. You can view files and clone it, but cannot push or open issues or pull requests.
2021-09-12 21:09:29 +02:00

13 lines
402 B
TypeScript

import { CLOSECODES, Payload } from "@fosscord/gateway/util/Constants";
import { Send } from "@fosscord/gateway/util/Send";
import { setHeartbeat } from "@fosscord/gateway/util/setHeartbeat";
import WebSocket from "@fosscord/gateway/util/WebSocket";
export async function onHeartbeat(this: WebSocket, data: Payload) {
// TODO: validate payload
setHeartbeat(this);
await Send(this, { op: 11 });
}