fix(bots/discord): attempt to fix sticky messages again

This commit is contained in:
PalmDevs
2025-04-09 20:14:32 +07:00
parent 5c9f4c6638
commit 7564b1a8f0
3 changed files with 9 additions and 4 deletions

View File

@@ -31,8 +31,13 @@ withContext(on, 'messageCreate', async ({ discord, logger }, msg) => {
store.forceTimerMs,
) as NodeJS.Timeout
else store.forceTimer.refresh()
// Force timer is already active, so we force send
} else store.send()
} else {
// Force timer is already active, so we clear the force timer
store.forceTimerActive = false
clearTimeout(store.forceTimer)
// and force send
store.send(true)
}
}
} else if (!store.forceTimerActive) {
// Both timers aren't active, so we start the timer