Fix startup error handling in index.js

This commit is contained in:
Christopher Cookman 2024-05-12 01:57:23 -06:00
parent 387379269a
commit 325bd25f07
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -727,6 +727,13 @@ discord.on('ready', async () => {
})();
start();
setTimeout(() => {
// Wait 10 seconds, if startup is still true, something went wrong
if (startup) {
console.log(`${colors.red("[ERROR]")} Startup failed, exiting...`);
process.exit(1);
}
}, 10000)
});
discord.on("interactionCreate", async (interaction) => {