Fixed startup crash codes (for Docker)

This commit is contained in:
DJj123dj
2025-03-12 22:12:51 +01:00
parent 177dee7468
commit e7ad3dd50b
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ let tempErrors: string[] = []
const tempError = () => { const tempError = () => {
if (tempErrors.length > 0){ if (tempErrors.length > 0){
console.log("\n\n==============================\n[OPEN TICKET ERROR]: "+tempErrors.join("\n[OPEN TICKET ERROR]: ")+"\n==============================\n\n") console.log("\n\n==============================\n[OPEN TICKET ERROR]: "+tempErrors.join("\n[OPEN TICKET ERROR]: ")+"\n==============================\n\n")
process.exit(0) process.exit(1)
} }
tempErrors = [] tempErrors = []
} }
+3 -3
View File
@@ -282,7 +282,7 @@ const main = async () => {
if (opendiscord.checkers.lastResult && !opendiscord.checkers.lastResult.valid && !(disableCheckerFlag ? disableCheckerFlag.value : false)){ if (opendiscord.checkers.lastResult && !opendiscord.checkers.lastResult.valid && !(disableCheckerFlag ? disableCheckerFlag.value : false)){
await opendiscord.events.get("onCheckerQuit").emit([opendiscord.checkers]) await opendiscord.events.get("onCheckerQuit").emit([opendiscord.checkers])
if (opendiscord.defaults.getDefault("checkerQuit")){ if (opendiscord.defaults.getDefault("checkerQuit")){
process.exit(0) process.exit(1)
//there is no afterCheckerQuitted event :) //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("The bot isn't a member of the server provided in the config!","error")
opendiscord.log("Please invite your bot to the server!","info") opendiscord.log("Please invite your bot to the server!","info")
console.log("\n") console.log("\n")
process.exit(0) process.exit(1)
} }
//throw if bot doesn't have permissions in main server //throw if bot doesn't have permissions in main server
if (!client.checkGuildPerms(mainServer)){ 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("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") opendiscord.log("Please give the bot \"Administrator\" permissions or visit the documentation!","info")
console.log("\n") console.log("\n")
process.exit(0) process.exit(1)
} }
if (opendiscord.defaults.getDefault("clientMultiGuildWarning")){ if (opendiscord.defaults.getDefault("clientMultiGuildWarning")){
//warn if bot is in multiple servers //warn if bot is in multiple servers