Fix startup error handling in index.js
This commit is contained in:
parent
387379269a
commit
325bd25f07
7
index.js
7
index.js
|
@ -727,6 +727,13 @@ discord.on('ready', async () => {
|
||||||
})();
|
})();
|
||||||
|
|
||||||
start();
|
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) => {
|
discord.on("interactionCreate", async (interaction) => {
|
||||||
|
|
Loading…
Reference in a new issue