eris/api/botRoute.ts

15 lines
294 B
TypeScript
Raw Normal View History

2023-11-17 23:52:51 +00:00
import { Elysia, t } from "elysia";
2023-10-17 13:03:14 +00:00
import { bot } from "../bot/mod.ts";
2023-11-17 23:52:51 +00:00
export const botRoute = new Elysia()
.get(
"",
async () => {
const username = bot.botInfo.username;
return { username };
},
{
response: t.Object({ username: t.String() }),
},
);