mirror of
https://github.com/cassoule/flopobot_v2.git
synced 2026-01-18 16:37:40 +01:00
hotfix
This commit is contained in:
@@ -92,7 +92,7 @@ async function handleAiMention(message, client, io) {
|
||||
const timestamps = (requestTimestamps.get(authorId) || []).filter((ts) => now - ts < SPAM_INTERVAL);
|
||||
|
||||
if (timestamps.length >= MAX_REQUESTS_PER_INTERVAL) {
|
||||
console.log(`[${now.toLocaleString()}] Rate limit exceeded for ${authorDB.username}`);
|
||||
console.log(`[${Date.now()}] Rate limit exceeded for ${authorDB.username}`);
|
||||
if (!authorDB.warned) {
|
||||
await message.reply(`T'abuses fréro, attends un peu ⏳`).catch(console.error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user