api events ready, now only the actions

This commit is contained in:
DJj123dj
2022-08-01 18:00:54 +02:00
parent 210923d29e
commit e2f237e7b6
4 changed files with 91 additions and 4 deletions
+4
View File
@@ -151,6 +151,8 @@ if (process.argv[2] && process.argv[2].startsWith("slash")){
}
const APIEvents = require("./core/api/modules/events")
const debugLog = (debugString) => {
const content = fs.existsSync("./openticketdebug.txt") ? fs.readFileSync("./openticketdebug.txt").toString() : "==========================\n<OPEN TICKET DEBUG FILE:>\n=========================="
fs.writeFileSync("./openticketdebug.txt",content+"\nDEBUG: "+debugString)
@@ -172,6 +174,8 @@ process.on("uncaughtException",async (error,origin) => {
const chalk = await (await import("chalk")).default
console.log(chalk.red("\nOPEN TICKET ERROR: ")+error+"\n"+chalk.green("\nCreate a ticket in our support server for more information!\nIf you do this, you might help us to avoid a future bug!\n"))
errorLog(error.name+": "+error.message+" | origin: "+origin,error.stack)
APIEvents.onError(error.name+": "+error.message,new Date())
})
client.login(config.auth_token)