From 17b7ab3a9d784dc409779a125fb72a23ba7ef8f4 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Wed, 16 Jul 2025 10:54:25 -0700 Subject: [PATCH] Update threadKeepAlive.ts --- packages/spike/src/discord/threadKeepAlive.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/spike/src/discord/threadKeepAlive.ts b/packages/spike/src/discord/threadKeepAlive.ts index 2b9e9ee..15cc17f 100644 --- a/packages/spike/src/discord/threadKeepAlive.ts +++ b/packages/spike/src/discord/threadKeepAlive.ts @@ -69,7 +69,14 @@ const reviveThread = async (client: Client, threadData: TrackedThread) => { console.log(`🟢 Thread "${threadData.threadName}" is already active, no action needed`) } } catch (error) { - console.error(`🚫 Failed to revive "${threadData.threadName}".`, getErrorMessage(error)) + console.error( + `🚫 Failed to revive "${threadData.threadName}:${threadData.threadId}".`, + getErrorMessage(error) + ) + await KV.update("threads", {}, (threads) => { + delete threads[threadData.threadId] + return threads + }) } }