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 + }) } }