Last active
July 10, 2022 09:14
-
-
Save MGalaCyber/7f8a3002d7e6b4e664f8838461d2d693 to your computer and use it in GitHub Desktop.
Anti Crash Systems
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//=====================================| Import the Module |=====================================\\ | |
const colors = require('colors'); | |
// ========================================| Anti Crash System Script |======================================= \\ | |
module.exports = async (client) => { | |
process.on('multipleResolves', (type, promise, reason) => { | |
console.log(`${colors.bold.red(`[MULTIPLE RESOLVES]`)} `); | |
console.log(type, promise, reason) | |
}); | |
process.on('unhandledRejection', (reason, promise) => { | |
console.log(`${colors.bold.red(`[UNHANDLED REJECTION]`)} `); | |
console.log(reason, promise) | |
}); | |
process.on('uncaughtException', (err, origin) => { | |
console.log(`${colors.bold.red(`[UNCAUGHT EXCEPTION]`)} `); | |
console.log(err, origin) | |
}); | |
process.on('uncaughtExceptionMonitor', (err, origin) => { | |
console.log(`${colors.bold.red(`[UNCAUGHT EXCEPTION MONITOR]`)} `); | |
console.log(err, origin) | |
}); | |
process.on('warning', (warning) => { | |
console.log(`${colors.bold.red(`[WARNING]`)} ` + `${warning}`.yellow); | |
}); | |
process.on('message', (message) => { | |
console.log(`${colors.bold.green(`[MESSAGE]`)} ` + `${message}`.yellow); | |
}); | |
process.on('beforeExit', (code) => { | |
console.log(`${colors.bold.green(`[BEFORE EXIT]`)} `); | |
console.log(code.yellow.dim) | |
}); | |
process.on('exit', (code) => { | |
console.log(`${colors.bold.green(`[EXIT]`)} `); | |
console.log(code.yellow.dim) | |
}); | |
} | |
/** | |
///////////////////////////////////////////////////////////////////// | |
//// //// | |
\\\\ Handlers Coded by GalaXd#9165 \\\\ | |
//// //// | |
\\\\ Work for MGalaCyber Development | https://galacyber.xyz \\\\ | |
//// //// | |
\\\\ All Right Reserved! \\\\ | |
//// //// | |
///////////////////////////////////////////////////////////////////// | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment