feat(moderation): skip AI analysis for music bots via AI_SKIP_ANALYSIS_USER_IDS

Jockie Music (user 411916947773587456) posts now-playing embeds/spotify links
~1347 captured messages — every one consumed a moderation LLM call for zero
signal and contributed to batch timeouts. Config AI_SKIP_ANALYSIS_USER_IDS
(default=Jockie) skips them at ALL three analysis paths:
- queueMessageAnalysis entry (direct skip-result like age-restricted)
- batchScheduler processing (pre-batch filter)
- individual recovery path (no fallback spam for already-skipped authors)

Skip-result mirrors age_restricted: status=clean, flags=[skip_analysis_user],
action=none — stays visible in the dashboard, never analyzed.
This commit is contained in:
asepharyana
2026-09-09 23:38:32 +07:00
parent db4e84f057
commit 023217b260
4 changed files with 93 additions and 3 deletions
@@ -39,6 +39,15 @@ export const configSchema = z
.describe(
"Channel IDs where bot messages are NOT captured/analyzed (bot detection stays on everywhere else)",
),
// User IDs whose messages are captured but NEVER AI-analyzed (skip result
// directly, like age-restricted). Used for high-volume music/reaction
// bots that spam the chat log (e.g. Jockie Music) — their now-playing
// embeds carry no moderation signal.
AI_SKIP_ANALYSIS_USER_IDS: z
.string()
.default("411916947773587456")
.transform((v) => v.split(",").filter(Boolean))
.describe("User IDs to skip AI analysis for (captured but not analyzed)"),
// ── Legacy voice ─────────────────────────────────────────────────────
VOICE_GUILD_ID: z.string().min(1).optional(),