Skip to content

Configuration

Gamer100309 edited this page Dec 25, 2025 · 2 revisions

⚙️ Configuration Guide

Advanced configuration options for the MC Server Status Bot.


📋 Configuration Files

The bot uses two types of configuration files:

Global Configuration

File: global-config.json
Location: Root directory
Purpose: Bot-wide settings

{
  "token": "YOUR_BOT_TOKEN_HERE",
  "language": "en"
}

Guild Configuration

File: configs/[guild-id].json
Location: configs/ directory
Purpose: Per-Discord-server settings

{
  "guildId": "123456789012345678",
  "updateInterval": 60000,
  "servers": []
}

🌍 Language Settings

Change Bot Language

Edit global-config.json:

{
  "language": "de"
}

Available languages:

  • en - English
  • de - German (Deutsch)

After changing: Run /reload in Discord


⏱️ Update Interval

Control how often the bot checks server status.

Default: 60000 ms (1 minute)

Edit guild config:

{
  "updateInterval": 120000
}

Common values:

  • 30000 - 30 seconds (frequent updates)
  • 60000 - 1 minute (default)
  • 120000 - 2 minutes (less resource usage)
  • 300000 - 5 minutes (minimal load)

⚠️ Note: Lower intervals = more API calls = higher resource usage


🎨 Embed Customization

Embed Colors

Customize status message colors:

{
  "embedColors": {
    "online": "#00FF00",
    "offline": "#FF0000"
  }
}

Color formats:

  • Hex: #00FF00
  • RGB: Not supported (use hex)

Popular colors:

  • Green: #00FF00 (online)
  • Red: #FF0000 (offline)
  • Blue: #0099FF (info)
  • Yellow: #FFFF00 (warning)

Custom Emojis

Use server emojis in status messages:

{
  "emojis": {
    "online": "<:online:123456789012345678>",
    "offline": "<:offline:987654321098765432>"
  }
}

How to get emoji ID:

  1. Type \:emoji_name: in Discord
  2. Copy the ID from the output
  3. Format: <:name:id>

🔐 Permission System

Setup Role

Allow non-admins to use setup commands:

{
  "setupRole": "123456789012345678"
}

How to get role ID:

  1. Enable Developer Mode in Discord
  2. Right-click role → Copy ID
  3. Paste into config

Users with this role can:

  • Use /setup
  • Use /reload
  • Use /refresh

🖼️ Server Icons

Enable/Disable Icons

{
  "showServerIcons": true
}

Options:

  • true - Show server favicons (default)
  • false - Hide icons

📝 Note: Only works for Java Edition servers


📊 Server Configuration

Add Server Manually

Edit guild config:

{
  "servers": [
    {
      "id": "unique-server-id-1",
      "name": "My Minecraft Server",
      "ip": "play.example.com",
      "port": 25565,
      "type": "java",
      "channelId": "123456789012345678"
    }
  ]
}

Server properties:

  • id - Unique identifier (any string)
  • name - Display name
  • ip - Server hostname or IP
  • port - Server port (25565 for Java, 19132 for Bedrock)
  • type - "java" or "bedrock"
  • channelId - Discord channel for status messages

Multiple Servers

Add multiple servers to array:

{
  "servers": [
    {
      "id": "server-1",
      "name": "Survival Server",
      "ip": "play.example.com",
      "port": 25565,
      "type": "java",
      "channelId": "111111111111111111"
    },
    {
      "id": "server-2",
      "name": "Creative Server",
      "ip": "creative.example.com",
      "port": 25566,
      "type": "java",
      "channelId": "222222222222222222"
    }
  ]
}

🔧 Advanced Options

Timeout Settings

Configure query timeout:

{
  "queryTimeout": 5000
}

Default: 5000 ms (5 seconds)

Adjust if:

  • Server is slow to respond
  • Network latency is high
  • Getting frequent timeout errors

Retry Logic

Configure retry attempts:

{
  "maxRetries": 3,
  "retryDelay": 1000
}
  • maxRetries - Attempts before marking offline
  • retryDelay - Milliseconds between retries

📝 Configuration Best Practices

Backup Configs

Before making changes:

cp global-config.json global-config.json.backup
cp -r configs/ configs-backup/

Validate JSON

Use JSONLint to check syntax before saving.

Common Mistakes

Trailing commas:

{
  "token": "abc123",  // ← Remove this comma
}

Missing quotes:

{
  token: "abc123"  // ← Should be "token"
}

Correct:

{
  "token": "abc123"
}

🔄 Applying Changes

After editing configuration:

  1. Save the file
  2. Run /reload in Discord
  3. Verify changes took effect

Or restart the bot:

Windows:

# Stop bot (Ctrl+C)
# Then run:
start_bot.bat

Linux/Mac:

# Stop bot (Ctrl+C)
# Then run:
./start_bot.sh

📚 Configuration Examples

Minimal Config

{
  "token": "YOUR_TOKEN",
  "language": "en"
}

Production Config

{
  "token": "YOUR_TOKEN",
  "language": "en",
  "updateInterval": 60000,
  "queryTimeout": 5000,
  "maxRetries": 3,
  "retryDelay": 1000,
  "showServerIcons": true,
  "embedColors": {
    "online": "#00FF00",
    "offline": "#FF0000"
  }
}

⚠️ Troubleshooting

Config not loading

Solutions:

  1. Check JSON syntax
  2. Verify file location
  3. Check file permissions
  4. Run /reload

Changes not applying

Solutions:

  1. Verify you edited correct file
  2. Save the file
  3. Run /reload
  4. Restart bot if needed

🔗 Related Pages


← Back to Home

Clone this wiki locally