Fixed startup crash codes (for Docker)
This commit is contained in:
@@ -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
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user