summary refs log tree commit diff
path: root/gateway/src/opcodes/Heartbeat.ts
blob: 46caee56352d91bd9a1edf97f1dad6ce1620413a (plain) (blame)
1
2
3
4
5
6
7
8
9
import { Payload, Send, setHeartbeat, WebSocket } from "@fosscord/gateway";

export async function onHeartbeat(this: WebSocket, data: Payload) {
	// TODO: validate payload

	setHeartbeat(this);

	await Send(this, { op: 11 });
}