Super Earth Broadcast 
A Discord bot for Helldivers 2 players, delivering real-time game updates, war status tracking, and community features.
✨ Features
- 🔔 Real-time war status updates from Helldivers 2
- 🚨 Automated notifications for planet losses, victories, and major events in designated channels
- 🗺️ Planet tracking with liberation progress
- 📊 Statistical reporting on community efforts
- 🏆 Major Order notifications and completion tracking
- 🤖 Discord slash commands for game information
- 🔄 Automatic deployment via CI/CD pipeline
- 🐳 Containerized deployment with Docker
🛠️ Tech Stack
- Node.js
- Discord.js (Bot framework)
- Docker (Containerization)
- GitHub Actions (CI/CD)
- ESLint (Code quality)
- PostgreSQL (Database)
- Redis (Caching)
📋 Prerequisites
Before you begin, ensure you have:
- ✅ Node.js 18+
- ✅ Discord bot token and application
- ✅ PostgreSQL database (e.g., Neon)
- ✅ Redis instance (e.g., Upstash)
- ✅ Docker and Docker Compose (for production)
- ✅ GitHub account (for CI/CD)
🚀 Installation
1. Clone the repository:
git clone https://github.com/thmslfb/helldivers-discord-bot.git
cd helldivers-discord-bot
2. Install dependencies:
npm install
3. Set up environment variables:
cp .env.example .env
# Discord.js
TOKEN="your-discord-bot-token"
GUILD_ID="your-discord-server-id"
USER_ID="your-discord-user-id"
ROLE_ID="role-id-for-permissions"
CLIENT_ID="your-bot-client-id"
# Channels
WAR_UPDATES_CHANNEL_ID="channel-for-war-updates"
# Database
DATABASE_URL="postgresql://username:password@localhost:5432/helldivers"
# Redis
REDIS_URL="rediss://:<password>@<upstash-endpoint>:6379"
# API
DIVEHARDER_API_URL="https://api.diveharder.com/v1"
HELLDIVERS_API_URL="https://api.helldivers2.dev/api/v1"
# Info
SUPER_CLIENT="your-client-identification"
SUPER_CONTACT="your-contact-info"
🏃♂️ Development
Start the development server:
node .
🐳 Docker Development
Run with Docker Compose:
docker compose up -d
🔄 CI/CD Pipeline
This project is configured with a robust CI/CD pipeline using GitHub Actions:
Continuous Integration (CI)
- ✅ Automated testing on every PR and push
- ✅ Code quality checks with ESLint
- ✅ Build verification to ensure Docker compatibility
Continuous Deployment (CD)
- 🚀 Automatic deployment when code is merged to main
- 🛡️ SSH-based secure deployments to production server
- 📊 Deployment status reporting with detailed logs
🤖 Bot Commands
The bot currently supports:
/superstore - Get the current Superstore rotation
Coming soon:
- Commands for Terminids, Illuminists and Automatons
- War status tracking
- Planet information
- And many others!
Note: Additional commands are under active development and will be released in future updates.
Automated Notifications
The bot sends automated messages to your configured war-updates channel when:
- 🔴 A planet is lost to enemy forces
- 🟢 A planet is liberated by Super Earth forces
- 🎖️ Major Orders are completed or failed
- 🌍 War state changes significantly
- 📝 Game patches and updates are released
- 🎮 New Warbonds become available
Note: Some notification features are still in development and will be rolled out in future updates.
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
🤝 Contributing
We welcome contributions! Here’s how you can help:
- 🍴 Fork the repository
- 🌿 Create your feature branch (
git checkout -b feature/amazing-feature)
- 💾 Commit your changes (
git commit -m 'Add some amazing feature')
- 📤 Push to the branch (
git push origin feature/amazing-feature)
- 🎯 Open a Pull Request
💬 Support
Need help? Please open an issue in the repository.
👏 Acknowledgments
Special thanks to these amazing projects:
评论