Skip to main content
McDis-RCON requires a Discord bot to function. This guide walks you through creating a bot, obtaining its token, and configuring proper permissions.

Creating a Discord Bot

1

Access Developer Portal

Go to the Discord Developer PortalLog in with your Discord account
2

Create New Application

Click New Application in the top-right cornerEnter a name for your application (e.g., “McDis RCON” or “Server Manager”)Click Create
3

Navigate to Bot Section

In the left sidebar, click BotClick Add BotConfirm by clicking Yes, do it!
4

Configure Bot Settings

Username: Set your bot’s username (e.g., “McDis Bot”)Icon: Optionally upload a profile picturePublic Bot: Toggle OFF (recommended to prevent others from inviting your bot)Requires OAuth2 Code Grant: Leave OFF
5

Enable Privileged Intents

Scroll down to Privileged Gateway IntentsEnable:
  • ☑️ Presence Intent
  • ☑️ Server Members Intent
  • ☑️ Message Content Intent (required)
Click Save Changes
Message Content Intent is required! Without it, McDis-RCON cannot read commands sent in Discord.

Obtaining Bot Token

1

View Token

In the Bot section, find TokenClick Reset Token (if first time) or Copy (if token already exists)
2

Copy Token

Click Copy to copy the token to your clipboardIMPORTANT: Keep this token secret! Anyone with this token can control your bot.
3

Add to Configuration

Open your md_config.yml file:
Bot Token: YOUR_TOKEN_HERE
Replace YOUR_TOKEN_HERE with your copied token
Never share your bot token!
  • Don’t commit it to public Git repositories
  • Don’t share screenshots containing it
  • Don’t share configuration files containing it
  • Regenerate the token immediately if exposed

Inviting Bot to Server

1

Generate Invite URL

In Discord Developer Portal, go to OAuth2URL GeneratorUnder Scopes, select:
  • ☑️ bot
2

Select Permissions

Under Bot Permissions, select:Recommended (simplest):
  • ☑️ Administrator
Or specific permissions:
  • ☑️ Read Messages/View Channels
  • ☑️ Send Messages
  • ☑️ Manage Messages
  • ☑️ Embed Links
  • ☑️ Attach Files
  • ☑️ Read Message History
  • ☑️ Manage Threads
  • ☑️ Create Public Threads
  • ☑️ Send Messages in Threads
3

Copy Invite URL

Scroll down and copy the generated URL
4

Invite Bot

Open the URL in your browserSelect the server where you want to add the botClick AuthorizeComplete the CAPTCHA if prompted
5

Verify Bot Joined

Check your Discord server’s member listYour bot should appear offline (it will come online when you start McDis-RCON)
Why Administrator? Granting Administrator permissions is the simplest approach and prevents permission-related issues with panel generation, thread management, and message control.

Setting Panel Channel

1

Create Panel Channel

In your Discord server, create a new text channelRecommended name: mcdis-panel, server-control, or similar
2

Enable Developer Mode

In Discord:
  • Click User Settings (gear icon)
  • Go to Advanced
  • Enable Developer Mode
3

Copy Channel ID

Right-click the panel channelSelect Copy ID
4

Add to Configuration

Open md_config.yml:
Panel ID: 1234567890123456789
Replace the number with your copied channel ID
The Panel ID is a long number (18-19 digits). Make sure you copy the channel ID, not the server ID or a user ID.

Channel Permissions

Ensure the bot has access to the panel channel:

Option 1: Default Channel Permissions

If the bot has Administrator permission server-wide, it automatically has access to all channels.

Option 2: Channel-Specific Permissions

If not using Administrator:
1

Channel Settings

Right-click the panel channel → Edit Channel
2

Permissions Tab

Go to Permissions
3

Add Bot Role

Click + next to “Roles/Members”Select your bot’s role or the bot itself
4

Grant Permissions

Enable the following permissions:
  • ☑️ View Channel
  • ☑️ Send Messages
  • ☑️ Manage Messages
  • ☑️ Embed Links
  • ☑️ Attach Files
  • ☑️ Read Message History
  • ☑️ Create Public Threads
  • ☑️ Manage Threads
  • ☑️ Send Messages in Threads
5

Save Changes

Click Save Changes

Testing Bot Connection

After configuration, test the connection:
1

Start McDis

Run McDis-RCON:
mcdis run
2

Check Startup Logs

You should see:
Initializing McDis RCON v0.4.30a...
Your configuration has been loaded successfully.
[INFO] discord.client: logging in using static token
[INFO] discord.gateway: Shard ID None has connected to Gateway
Logged in as Your Bot Name#1234!
3

Verify Bot Online

Check your Discord server - the bot should now show as online
4

Check Panel Channel

Go to your panel channel - you should see:
  • Panel message with buttons
  • Console threads created

Troubleshooting Discord Setup

Possible causes:
  • Token is incorrect or incomplete
  • Token has been regenerated
  • Token contains extra spaces
Solutions:
  • Copy the token again from Developer Portal
  • Ensure no spaces before/after token in config
  • Try regenerating token and using the new one
Error message:
Error: Channel with id 123456789 not found.
Possible causes:
  • Panel ID is incorrect
  • Bot doesn’t have access to channel
  • Channel was deleted
Solutions:
  • Verify you copied the channel ID, not server ID
  • Ensure bot is in the server
  • Check channel permissions
  • Recreate channel and copy new ID
Possible causes:
  • Bot lacks “Create Public Threads” permission
  • Bot lacks “Manage Threads” permission
  • Server thread limit reached
Solutions:
  • Grant Administrator permission
  • Or grant specific thread permissions
  • Archive old unused threads
Possible causes:
  • Message Content Intent not enabled
  • Bot lacks Read Messages permission
Solutions:
  • Enable Message Content Intent in Developer Portal
  • Grant Read Messages/View Channels permission
  • Restart bot after enabling intent
Possible causes:
  • McDis-RCON not running
  • Connection issues
  • Discord API outage
Solutions:
  • Start McDis with mcdis run
  • Check internet connectivity
  • Check Discord Status

Security Best Practices

Token Security

  • Never share your bot token
  • Use environment variables in production
  • Regenerate token if exposed
  • Don’t commit token to Git

Permission Principle

  • Use minimum required permissions
  • Or use Administrator for simplicity
  • Restrict panel channel access
  • Limit who can control servers

Public Bot

  • Keep “Public Bot” disabled
  • Prevents unauthorized invites
  • Only you can invite your bot

Server Security

  • Use role-based channel access
  • Audit who has panel access
  • Monitor Error Reports thread
  • Review console thread activity

Advanced: Using Environment Variables

For production deployments, consider using environment variables:

Setup

# Create .env file
echo "MCDIS_BOT_TOKEN=your_token_here" > .env

# Don't commit .env
echo ".env" >> .gitignore

Modify Configuration Loading

You would need to modify McDis source to read from environment:
import os
from dotenv import load_dotenv

load_dotenv()

token = os.getenv('MCDIS_BOT_TOKEN')
This requires modifying McDis-RCON source code, which is not officially supported but can be done for advanced users.

Language Configuration

McDis-RCON supports multiple languages:
### Language that McDis will use.
### Valid Values: [en, es]
### Default Value: en
Language: en
Available languages:
  • en - English (default)
  • es - Spanish (Español)
All Discord messages, panel text, and responses will use the configured language.

Configuration Example

Complete Discord configuration section:
# =========================================
#         McDis RCON Configuration
# =========================================

### Discord Bot Token
### Get from: https://discord.com/developers/applications
Bot Token: MTIzNDU2Nzg5MDEyMzQ1Njc4OQ.GaBcDe.FgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoPqRs

### Panel Channel ID
### Enable Developer Mode in Discord, right-click channel, Copy ID
Panel ID: 987654321098765432

### Interface Language
Language: en

Configuration Overview

Complete configuration file reference

Process Setup

Configure servers and networks

Quickstart

Complete setup walkthrough

Discord Panel

Using the Discord interface

Build docs developers (and LLMs) love