From 3b892b3db046b2e06d92521c0872ac42fda7b226 Mon Sep 17 00:00:00 2001 From: nin0 Date: Sun, 11 May 2025 12:56:41 -0400 Subject: [PATCH] add uncaught exception handler --- src/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index f835bd2..7ac52d1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,8 @@ -import { AllIntents, Client } from "oceanic.js"; +import { AllIntents, Client, ComponentTypes, MessageFlags } from "oceanic.js"; import { selfappReq } from "./selfappReq"; import { setupJoinRequestHandler } from "./joinRequestHandler"; +import { Constants } from "./Constants"; +import { Divider, generateList, generateUserComponent, Header } from "./cv2"; export const client = new Client({ auth: `Bot ${process.env.BOT_TOKEN}`, @@ -20,4 +22,8 @@ client.on("ready", async () => { setupJoinRequestHandler(client.shards.first()!); }); +process.on("uncaughtException", (e) => { + console.error(e); +}); + client.connect();