use esbuild for watch
This commit is contained in:
parent
dcd22a9d8c
commit
069400233a
5 changed files with 27 additions and 343 deletions
10
src/index.ts
10
src/index.ts
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue