This commit is contained in:
Milo
2025-12-10 10:16:33 +01:00
parent 7c48f16cad
commit 34c259c3cc

View File

@@ -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);
}