Creating a Discord Bot
Access Developer Portal
Go to the Discord Developer PortalLog in with your Discord account
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
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
Obtaining Bot Token
View Token
In the Bot section, find TokenClick Reset Token (if first time) or Copy (if token already exists)
Copy Token
Click Copy to copy the token to your clipboardIMPORTANT: Keep this token secret! Anyone with this token can control your bot.
Inviting Bot to Server
Generate Invite URL
In Discord Developer Portal, go to OAuth2 → URL GeneratorUnder Scopes, select:
- ☑️
bot
Select Permissions
Under Bot Permissions, select:Recommended (simplest):
- ☑️ Administrator
- ☑️ Read Messages/View Channels
- ☑️ Send Messages
- ☑️ Manage Messages
- ☑️ Embed Links
- ☑️ Attach Files
- ☑️ Read Message History
- ☑️ Manage Threads
- ☑️ Create Public Threads
- ☑️ Send Messages in Threads
Invite Bot
Open the URL in your browserSelect the server where you want to add the botClick AuthorizeComplete the CAPTCHA if prompted
Setting Panel Channel
Create Panel Channel
In your Discord server, create a new text channelRecommended name:
mcdis-panel, server-control, or similarEnable Developer Mode
In Discord:
- Click User Settings (gear icon)
- Go to Advanced
- Enable Developer Mode
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: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
Testing Bot Connection
After configuration, test the connection:Troubleshooting Discord Setup
Bot won't connect / Invalid token error
Bot won't connect / Invalid token error
Possible causes:
- Token is incorrect or incomplete
- Token has been regenerated
- Token contains extra spaces
- Copy the token again from Developer Portal
- Ensure no spaces before/after token in config
- Try regenerating token and using the new one
Panel channel not found error
Panel channel not found error
Error message:Possible causes:
- Panel ID is incorrect
- Bot doesn’t have access to channel
- Channel was deleted
- Verify you copied the channel ID, not server ID
- Ensure bot is in the server
- Check channel permissions
- Recreate channel and copy new ID
Bot can't create threads
Bot can't create threads
Possible causes:
- Bot lacks “Create Public Threads” permission
- Bot lacks “Manage Threads” permission
- Server thread limit reached
- Grant Administrator permission
- Or grant specific thread permissions
- Archive old unused threads
Bot can't read commands
Bot can't read commands
Possible causes:
- Message Content Intent not enabled
- Bot lacks Read Messages permission
- Enable Message Content Intent in Developer Portal
- Grant Read Messages/View Channels permission
- Restart bot after enabling intent
Bot appears offline
Bot appears offline
Possible causes:
- McDis-RCON not running
- Connection issues
- Discord API outage
- 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
Modify Configuration Loading
You would need to modify McDis source to read from environment: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:en- English (default)es- Spanish (Español)
Configuration Example
Complete Discord configuration section:Related Configuration
Configuration Overview
Complete configuration file reference
Process Setup
Configure servers and networks
Quickstart
Complete setup walkthrough
Discord Panel
Using the Discord interface
