chore: set continuation interval to 10s; restart per-user timer on message
This commit is contained in:
10
src/bot.js
10
src/bot.js
@@ -409,6 +409,16 @@ client.on('messageCreate', async (message) => {
|
||||
|
||||
await appendShortTerm(userId, 'user', cleaned);
|
||||
|
||||
try {
|
||||
const state = continuationState.get(userId);
|
||||
if (state) {
|
||||
state.lastUserTs = Date.now();
|
||||
continuationState.set(userId, state);
|
||||
}
|
||||
} catch (err) {
|
||||
console.warn('[bot] Failed to reset continuation timer:', err);
|
||||
}
|
||||
|
||||
// If the user indicates they are leaving, stop proactive continuation
|
||||
if (stopCueRegex.test(cleaned)) {
|
||||
stopContinuationForUser(userId);
|
||||
|
||||
Reference in New Issue
Block a user