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-04-22 23:37:07 +02:00

14 lines
332 B
TypeScript

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) {}