forked from pinks/eris
1
0
Fork 0
eris/api/botRoute.ts

10 lines
353 B
TypeScript
Raw Normal View History

2023-10-17 13:03:14 +00:00
import { createEndpoint, createMethodFilter } from "t_rest/server";
import { bot } from "../bot/mod.ts";
export const botRoute = createMethodFilter({
GET: createEndpoint({ query: null, body: null }, async () => {
const username = bot.botInfo.username;
return { status: 200, body: { type: "application/json", data: { username } } };
}),
});