Sends instant notifications to Discord when the bot restarts, helping
track stability issues and auto-recovery events.
Changes:
- Add notify_restart.py script to send webhook notifications
- Integrate notification into bot startup (on_ready event)
The notification includes:
- Timestamp of restart (CST)
- Reason (healthcheck failure detection)
- Reference to diagnostics logs
Configuration:
Set RESTART_WEBHOOK_URL environment variable in docker-compose.yml
to enable notifications.
This provides immediate visibility when Docker auto-restarts the bot
due to crashes or healthcheck failures.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implements a comprehensive health check system using aiohttp to support
container orchestration and external monitoring systems.
Features:
- /health endpoint: Basic liveness check (is process running?)
- /ready endpoint: Readiness check (is bot connected to Discord?)
- /metrics endpoint: Detailed bot metrics (guilds, users, cogs, latency)
Changes:
- Add aiohttp to requirements.txt
- Create health_server.py module with HTTP server
- Update paperdynasty.py to run health server alongside bot
- Update docker-compose.yml with HTTP-based healthcheck
- Fix deploy.sh Docker image name
Benefits:
- Auto-restart on bot hangs/deadlocks
- Foundation for external monitoring (Prometheus, Grafana, etc.)
- Detailed diagnostics for troubleshooting
- Industry-standard health check pattern
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>