eris/api/botRoute.ts

15 lines
294 B
TypeScript
Raw Permalink Normal View History

import { Elysia, t } from "elysia";
2023-10-17 13:03:14 +00:00
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() }),
},
);