54e7220d06f7c59d653d0a666b3a3c4ae0712aba
Two bugs causing 23 spurious 'error' logs after successful deletions: 1. batchProcessor switch missing 'completed' case: partitionBatchOutcome returns 'completed' for successful messages, but the switch only handled 'upload_pending' and 'api_failed'. Successful messages fell through to default → re-enqueued to individual fallback → re-analyzed → re-delete attempt → error (message already gone from Discord). Now explicitly skips 'completed' messages. 2. isAlreadyDeletedError only caught codes 10008/404. Discord also returns 10003 (Unknown Channel) and 50001 (Missing Access) when a message or channel is gone. Added these codes plus text-based fallback matching 'Unknown Message'/'Unknown Channel'. Impact: eliminates ~23 redundant error logs per day + stops wasted LLM calls re-analyzing already-processed messages.
Description
Bete Discord moderation watcher
27 MiB
Languages
TypeScript
97%
Nix
0.8%
Shell
0.7%
CSS
0.7%
PLpgSQL
0.5%
Other
0.3%