From 325bd25f07066a8b7892d13c9578797089beafc5 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Sun, 12 May 2024 01:57:23 -0600 Subject: [PATCH] Fix startup error handling in index.js --- index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.js b/index.js index 4243552..270cc29 100644 --- a/index.js +++ b/index.js @@ -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) => {