add uncaught exception handler
This commit is contained in:
parent
281b5db156
commit
3b892b3db0
1 changed files with 7 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue