From e7ad3dd50b8048f2a683a763f3e7046857dbcec5 Mon Sep 17 00:00:00 2001 From: DJj123dj <80536295+DJj123dj@users.noreply.github.com> Date: Wed, 12 Mar 2025 22:12:51 +0100 Subject: [PATCH] Fixed startup crash codes (for Docker) --- src/core/startup/init.ts | 2 +- src/index.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/startup/init.ts b/src/core/startup/init.ts index d1e5958..450ab7e 100644 --- a/src/core/startup/init.ts +++ b/src/core/startup/init.ts @@ -4,7 +4,7 @@ let tempErrors: string[] = [] const tempError = () => { if (tempErrors.length > 0){ console.log("\n\n==============================\n[OPEN TICKET ERROR]: "+tempErrors.join("\n[OPEN TICKET ERROR]: ")+"\n==============================\n\n") - process.exit(0) + process.exit(1) } tempErrors = [] } diff --git a/src/index.ts b/src/index.ts index 1bb3b3e..9c0c914 100644 --- a/src/index.ts +++ b/src/index.ts @@ -282,7 +282,7 @@ const main = async () => { if (opendiscord.checkers.lastResult && !opendiscord.checkers.lastResult.valid && !(disableCheckerFlag ? disableCheckerFlag.value : false)){ await opendiscord.events.get("onCheckerQuit").emit([opendiscord.checkers]) if (opendiscord.defaults.getDefault("checkerQuit")){ - process.exit(0) + process.exit(1) //there is no afterCheckerQuitted event :) } } @@ -366,7 +366,7 @@ const main = async () => { opendiscord.log("The bot isn't a member of the server provided in the config!","error") opendiscord.log("Please invite your bot to the server!","info") console.log("\n") - process.exit(0) + process.exit(1) } //throw if bot doesn't have permissions in main server if (!client.checkGuildPerms(mainServer)){ @@ -374,7 +374,7 @@ const main = async () => { opendiscord.log("The bot doesn't have the correct permissions in the server provided in the config!","error") opendiscord.log("Please give the bot \"Administrator\" permissions or visit the documentation!","info") console.log("\n") - process.exit(0) + process.exit(1) } if (opendiscord.defaults.getDefault("clientMultiGuildWarning")){ //warn if bot is in multiple servers