1
0
forked from pinks/eris
nyx/api/botRoute.ts
pinks 5b6a1a3471 refactor: rewrite API to Elysia (#25)
https://elysiajs.com/
Reviewed-on: pinks/eris#25
Co-authored-by: pinks <lisq@cock.li>
Co-committed-by: pinks <lisq@cock.li>
2023-11-20 02:14:14 +00:00

15 lines
294 B
TypeScript

import { Elysia, t } from "elysia";
import { bot } from "../bot/mod.ts";
export const botRoute = new Elysia()
.get(
"",
async () => {
const username = bot.botInfo.username;
return { username };
},
{
response: t.Object({ username: t.String() }),
},
);