dev #11

Merged
Latte merged 12 commits from dev into main 2026-02-10 19:02:08 +00:00

12 Commits

Author SHA1 Message Date
95db3f75f5 quick fix 2026-01-28 18:56:48 +00:00
be5daffdb4 fuck openai and there nsfw guidelines 2026-01-28 18:38:23 +00:00
269ba15165 fix: Add permission checks and debug logging for AI moderation
Improve visibility into why images might not be analyzed in some channels.

Changes:
- Add permission check for 'Manage Messages' before processing
- Add debug logging when skipping messages (already analyzed, no media)
- Add info logging when checking messages (shows channel, attachments, embeds)
- Add warning when AI provider not configured
- Add channel name to rate limit warnings

Debug output now shows:
- Which channels lack permissions
- Why messages are skipped
- Rate limit status per channel
- AI provider configuration status

Helps diagnose: 'bot niet pakt in alle chats de content van images'
2026-01-27 20:29:02 +01:00
b9bc2cf0b5 docs: Rewrite README with comprehensive feature documentation
Complete overhaul of README.md with better structure and clarity.

New sections:
- Clear overview of what GuardDen is (and isn't)
- Feature comparison table with costs
- Detailed feature descriptions
- Prerequisites table
- Step-by-step Discord bot setup
- Configuration options explained
- Detection flow diagram
- Cost controls breakdown
- Troubleshooting guide
- Project structure
- Development guide

Improvements:
- Professional formatting with tables
- Clear cost transparency
- Better quick start instructions
- Comprehensive configuration guide
- Troubleshooting section for common issues
2026-01-27 20:19:49 +01:00
562c92dae6 docs: Add testing TODO for minimal bot refactor
Document which tests need updates after feature removal.

Tests referencing removed features:
- test_verification.py (verification removed)
- test_file_config.py (per-guild config removed)
- test_ai.py (text moderation removed)

conftest.py needs updates for removed model imports.

Core feature tests should still work:
- test_automod.py (spam detection)
- test_nsfw_only_filtering.py (NSFW detection)
2026-01-27 20:16:14 +01:00
7ebad5d249 fix: Add config.yml support for Docker deployment
Mount config.yml into Docker container and provide example template.

Changes:
- Mount config.yml as read-only volume in docker-compose.yml
- Create config.example.yml template for users
- Add config.yml to .gitignore (contains sensitive settings)
- Update README.md with config file setup instructions

Fixes 'Config file not found' error in Docker deployment.

Users should:
1. Copy config.example.yml to config.yml
2. Edit config.yml with their settings
3. Run docker compose up -d
2026-01-27 20:15:39 +01:00
537ae15998 fix: Remove ModerationResult and unused imports from AI services
Fix ImportError caused by removed ModerationResult class.

Changes:
- Remove ModerationResult from ai/__init__.py exports
- Remove unused ContentCategory enum and parse_categories function
- Remove unused imports from ai_moderation.py
- Clean up NullProvider to only have analyze_image method

Fixes bot startup crash.
2026-01-27 20:10:31 +01:00
cb6049361e feat: Add user blocklist for instant media deletion
Add blocklist feature to automatically delete ALL media (images, GIFs,
embeds, URLs) from specific users without AI analysis.

Changes:
- Add blocked_user_ids config field to config.yml
- Implement blocklist check in ai_moderation.py (runs before AI checks)
- Update README.md with blocklist documentation

Benefits:
- No AI cost (instant deletion)
- Useful for known spam accounts or problematic users
- Blocks all media types: attachments, embeds, URLs
- Logged for moderation tracking
2026-01-27 19:58:40 +01:00
df8da05f36 docs: Update project description to reflect minimal bot focus 2026-01-27 19:30:38 +01:00
b4f29a9d5e feat: Complete minimal bot refactor - AI providers, models, docs, and migration
Changes:
- Strip AI providers to image-only analysis (remove text/phishing methods)
- Simplify guild models (remove BannedWord, reduce GuildSettings columns)
- Create migration to drop unused tables and columns
- Rewrite README for minimal bot focus
- Update CLAUDE.md architecture documentation

Result: -992 lines, +158 lines (net -834 lines)
Cost-conscious bot ready for deployment.
2026-01-27 19:25:57 +01:00
d972f6f51c feat: Complete cog and service rewrites
- Automod cog: 520 -> 100 lines (spam only, no commands)
- AI moderation cog: 664 -> 250 lines (images only, full cost controls)
- Automod service: 600+ -> 200 lines (spam only)
- All cost control measures implemented
- NSFW video domain blocking
- Rate limiting per guild and per user
- Image deduplication
- File size limits
- Configurable via YAML

Next: Update AI providers and models
2026-01-27 19:17:18 +01:00
08815a3dd0 WIP: Minimal bot refactor - new files and core updates
- Created config.yml template with conservative AI limits
- Created owner.py cog (status, reload, ping commands)
- Created config_loader.py service for YAML config
- Created ai_rate_limiter.py for AI cost control
- Updated bot.py to load only 3 cogs (automod, ai_moderation, owner)
- Simplified config.py (removed unused settings)
- Deleted unnecessary cogs, services, models
- Updated models/__init__.py

Next: Update automod and ai_moderation cogs
2026-01-27 18:58:56 +01:00