diff --git a/packages/spike/src/discord/index.ts b/packages/spike/src/discord/index.ts index 1dec46c..3e1aa39 100644 --- a/packages/spike/src/discord/index.ts +++ b/packages/spike/src/discord/index.ts @@ -18,14 +18,14 @@ await client.login(process.env.DISCORD_TOKEN) listenForEvents(client) -process.on("unhandledRejection", (error) => { +process.on("unhandledRejection", async (error) => { console.error("💥 Unhandled promise rejection:", error) - logCrash(error) + await logCrash(error) }) -process.on("uncaughtException", (error) => { +process.on("uncaughtException", async (error) => { console.error("💥 Uncaught exception:", error) - logCrash(error) + await logCrash(error) }) runCronJobs(client)