forked from pinks/eris
1
0
Fork 0
nyx/app/adminStore.ts

12 lines
302 B
TypeScript
Raw Normal View History

import { Static, t } from "elysia";
2023-10-23 00:39:01 +00:00
import { db } from "./db.ts";
import { Tkv } from "../utils/Tkv.ts";
2023-10-23 00:39:01 +00:00
export const adminSchema = t.Object({
promotedBy: t.Nullable(t.Number()),
});
2023-10-23 00:39:01 +00:00
export type Admin = Static<typeof adminSchema>;
2023-10-23 00:39:01 +00:00
export const adminStore = new Tkv<["admins", number], Admin>(db);