Implement GuardDen Discord moderation bot
Features: - Core moderation: warn, kick, ban, timeout, strike system - Automod: banned words filter, scam detection, anti-spam, link filtering - AI moderation: Claude/OpenAI integration, NSFW detection, phishing analysis - Verification system: button, captcha, math, emoji challenges - Rate limiting system with configurable scopes - Event logging: joins, leaves, message edits/deletes, voice activity - Per-guild configuration with caching - Docker deployment support Bug fixes applied: - Fixed await on session.delete() in guild_config.py - Fixed memory leak in AI moderation message tracking (use deque) - Added error handling to bot shutdown - Added error handling to timeout command - Removed unused Literal import - Added prefix validation - Added image analysis limit (3 per message) - Fixed test mock for SQLAlchemy model
This commit is contained in:
44
docker-compose.yml
Normal file
44
docker-compose.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
services:
|
||||
bot:
|
||||
build: .
|
||||
container_name: guardden-bot
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- GUARDDEN_DISCORD_TOKEN=${GUARDDEN_DISCORD_TOKEN}
|
||||
- GUARDDEN_DATABASE_URL=postgresql://guardden:guardden@db:5432/guardden
|
||||
- GUARDDEN_LOG_LEVEL=${GUARDDEN_LOG_LEVEL:-INFO}
|
||||
- GUARDDEN_AI_PROVIDER=${GUARDDEN_AI_PROVIDER:-none}
|
||||
- GUARDDEN_ANTHROPIC_API_KEY=${GUARDDEN_ANTHROPIC_API_KEY:-}
|
||||
- GUARDDEN_OPENAI_API_KEY=${GUARDDEN_OPENAI_API_KEY:-}
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
networks:
|
||||
- guardden
|
||||
|
||||
db:
|
||||
image: postgres:15-alpine
|
||||
container_name: guardden-db
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- POSTGRES_USER=guardden
|
||||
- POSTGRES_PASSWORD=guardden
|
||||
- POSTGRES_DB=guardden
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U guardden -d guardden"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- guardden
|
||||
|
||||
networks:
|
||||
guardden:
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
Reference in New Issue
Block a user