Minecraft Update Bot 🎮
Automatically detects new Minecraft releases and posts them to a subreddit.
Features
- ✅ Checks Minecraft launcher manifest for new releases
- ✅ Posts to Reddit whenever a new version is detected
- ✅ Tracks posted versions to avoid duplicates
- ✅ Runs continuously with configurable check interval
- ✅ Supports multiple release types (releases, snapshots, etc.)
- ✅ Docker & Docker Compose ready
- ✅ Customizable post templates via subreddit wiki
- ✅ Different post formats for different release types
- ✅ Auto-update notifications - Gets alerted when new bot versions are available
Quick Start - Docker (Recommended)
# Copy and edit environment file
copy .env.example .env
# Edit .env with your Reddit credentials
# Start the bot
docker-compose up -d
# View logs
docker-compose logs -f
See DOCKER.md for detailed Docker setup instructions.
Customizing Posts with Wiki Configuration
The bot loads post templates from your subreddit's wiki page minecraft_update_bot. This allows you to:
- Create different post formats for releases vs. snapshots
- Customize titles and bodies without restarting
- Support legacy version types with custom messages
Quick Setup:
- Create a wiki page named
minecraft_update_boton your subreddit - Add YAML configuration with your templates (see example below)
- Bot auto-loads every 30 minutes
Simple Example:
release:
title: "Minecraft {version} Released!"
body: |
# Minecraft {version}
Available now! Get it at [minecraft.net](https://minecraft.net)
**Released:** {release_date}
snapshot:
title: "Minecraft {version} Snapshot"
body: |
# New Snapshot Available
Test {version} before the official release!
👉 See WIKI_CONFIG.md for complete setup and examples.
Manual Setup
1. Install Dependencies
pip install -r requirements.txt
2. Create Reddit Application
- Go to https://www.reddit.com/prefs/apps
- Click "Create an app" or "Create another app"
- Fill in the form:
- Name: MinecraftUpdateBot
- App type: Script
- Redirect URI: http://localhost:8080
- Copy the credentials
3. Configure the Bot
Edit config.py and fill in your credentials:
REDDIT_CLIENT_ID = "YOUR_CLIENT_ID" # From app page
REDDIT_CLIENT_SECRET = "YOUR_CLIENT_SECRET" # From app page
REDDIT_USERNAME = "YOUR_USERNAME" # Your Reddit username
REDDIT_PASSWORD = "YOUR_PASSWORD" # Your Reddit password
SUBREDDIT = "YOUR_SUBREDDIT" # Subreddit to post to
Or use environment variables (Docker-friendly):
set REDDIT_CLIENT_ID=your_client_id
set REDDIT_CLIENT_SECRET=your_client_secret
set REDDIT_USERNAME=your_username
set REDDIT_PASSWORD=your_password
set SUBREDDIT=your_subreddit
python main.py
4. Customize (Optional)
In config.py:
- RELEASE_TYPES: Change
["release"]to include snapshots or other types- Options:
"release","snapshot","old_beta","old_alpha"
- Options:
- CHECK_INTERVAL: How often to check for updates (in seconds)
- Default: 3600 (1 hour)
- POST_TEMPLATE: Customize the post format
Examples:
# Check for both releases and snapshots
RELEASE_TYPES = ["release", "snapshot"]
# Check every 30 minutes
CHECK_INTERVAL = 1800
# Check every 10 minutes (for testing)
CHECK_INTERVAL = 600
5. Run the Bot
python main.py
You should see output like:
[BOT] Starting Minecraft Update Bot...
[BOT] ✓ Successfully connected to Reddit
[BOT] Started update checker (checking every 3600 seconds)
[BOT] ✓ Bot is running
Automatic Update Notifications
The bot includes an update checker that periodically polls for new versions and notifies your subreddit's modteam via modmail when updates are available.
How it works:
- Checks
https://updts.slfhstd.ukevery hour for new versions - Sends modmail to your subreddit's modteam if an update is found
- Limits notifications to once per 24 hours to avoid spam
- No configuration needed - it runs automatically!
What you'll see:
[UPDATE_CHECKER] Started for MinecraftUpdateBot v1.0
[UPDATE_CHECKER] Update found: 1.0 -> 1.1
[UPDATE_CHECKER] Sent update notification to r/your_subreddit
The modteam will receive a message with the new version number and changelog link.
How It Works
- Initialization: Bot connects to Reddit and loads posted versions from
DB/posted_versions.json - Check Loop: Every CHECK_INTERVAL seconds, it:
- Fetches the latest Minecraft versions from Mojang's launcher manifest
- Checks if any are new (not in
DB/posted_versions.json) - Posts to subreddit if new versions found
- Saves the posted version IDs
- Background: Runs in background thread, checking continuously
Database
Posted versions are stored in DB/posted_versions.json:
{
"posted": [
"1.20.1",
"1.21",
"1.21.1"
]
}
To reset (post all new versions again), delete or clear this file.
Troubleshooting
Connection Issues
- Check your credentials in
config.pyor environment variables - Verify your Reddit app is configured correctly
- Make sure your Reddit account can post to the subreddit
"No New Releases"
- The bot only posts once per version
- Check
DB/posted_versions.jsonto see what's been posted - Delete a version from the file to repost it
Test with Snapshots
Change RELEASE_TYPES = ["snapshot"] and CHECK_INTERVAL = 60 to test quickly.
Files
main.py- Main bot scriptconfig.py- Configurationminecraft_checker.py- Fetches version data from Mojangtest_setup.py- Validates your setupDockerfile- Docker image definitiondocker-compose.yml- Docker Compose configurationDB/- Database folder (created automatically)requirements.txt- Python dependencies
License
MIT