summary refs log tree commit diff
path: root/src/util/Event.ts
blob: 5ff027e5cd5bbe915a86df7b359862864666f12b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { Event, EventModel } from "@fosscord/server-util";

export async function emitEvent(payload: Omit<Event, "created_at">) {
	const obj = {
		created_at: new Date(), // in seconds
		...payload,
	};
	// TODO: bigint isn't working

	return await new EventModel(obj).save();
}

export async function emitAuditLog(payload: any) {}