diff --git a/apis/websocket/package.json b/apis/websocket/package.json index 8bb1b87..5553234 100755 --- a/apis/websocket/package.json +++ b/apis/websocket/package.json @@ -37,4 +37,4 @@ "@types/ws": "^8.18.1", "typed-emitter": "^2.1.0" } -} \ No newline at end of file +} diff --git a/bots/discord/package.json b/bots/discord/package.json index 841d351..942d28a 100644 --- a/bots/discord/package.json +++ b/bots/discord/package.json @@ -43,4 +43,4 @@ "discord-api-types": "^0.37.119", "drizzle-kit": "^0.22.8" } -} \ No newline at end of file +} diff --git a/bots/discord/src/events/discord/messageCreate/stickyMessageReset.ts b/bots/discord/src/events/discord/messageCreate/stickyMessageReset.ts index 8a7a4f5..9ad7e6b 100644 --- a/bots/discord/src/events/discord/messageCreate/stickyMessageReset.ts +++ b/bots/discord/src/events/discord/messageCreate/stickyMessageReset.ts @@ -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