use esbuild for watch

This commit is contained in:
nin0 2025-05-16 06:20:36 -04:00
parent dcd22a9d8c
commit 069400233a
Signed by: nin0
SSH key fingerprint: SHA256:NOoDnFVvZNFvqfXCIhzr6oCTDImZAbTTuyAysZ8Ufk8
5 changed files with 27 additions and 343 deletions

View file

@ -16,7 +16,7 @@ export const client = new Client({
client.on("ready", async () => {
console.log(`Logged in as ${client.user.tag}`);
console.log("Checking user token");
const selfappInfo = await selfappReq("/users/@me", "GET");
const selfappInfo: any = await selfappReq("/users/@me", "GET");
if (!selfappInfo.username) console.error("Can't use selfapp");
else console.log("Can use selfapp");
@ -27,5 +27,9 @@ process.on("uncaughtException", (e) => {
console.error(e);
});
openDb();
client.connect();
export function start() {
openDb();
client.connect();
}
start();