add uncaught exception handler

This commit is contained in:
nin0 2025-05-11 12:56:41 -04:00
parent 281b5db156
commit 3b892b3db0
Signed by: nin0
SSH key fingerprint: SHA256:NOoDnFVvZNFvqfXCIhzr6oCTDImZAbTTuyAysZ8Ufk8

View file

@ -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();