How to Set Up a Discord Bot for Your Minecraft Server
Step-by-step guide to creating and configuring a Discord bot for your Minecraft server, application setup, permissions, token management, and plugin integration.
Why Add a Discord Bot to Your Minecraft Server?
A discord bot minecraft server integration bridges your in-game community with your Discord server. Players can see who is online, receive server announcements, chat across platforms, and even run administrative commands, all without opening Minecraft. If your server has more than a handful of regulars, a Discord bot is no longer optional; it is infrastructure.
This guide walks you through creating a Discord application, generating a bot token, inviting the bot to your guild, and connecting it to your Minecraft server using DiscordSRV, the most widely used bridge plugin.
Step 1, Create a Discord Application
Head to the Discord Developer Portal and click New Application. Give it a descriptive name, something like "MC Server Bot" works fine. This creates the container for your bot.
Inside the application, navigate to the Bot tab on the left sidebar and click Add Bot. Confirm the prompt. Discord generates a bot user and a token. Copy the token immediately and store it somewhere safe, you will need it later, and Discord only shows it once before requiring a reset.
Required Intents
Scroll down on the Bot page and enable the following Privileged Gateway Intents:
- Presence Intent, allows the bot to track member online status.
- Server Members Intent, required for role sync and member lookups.
- Message Content Intent, needed for chat bridging and command parsing.
Without these intents, your discord bot minecraft server integration will silently fail on key features like chat relay.
Step 2, Generate an Invite Link
Go to the OAuth2 > URL Generator tab. Under Scopes, select bot and applications.commands. Under Bot Permissions, grant at minimum:
- Send Messages
- Manage Roles (if you plan to sync Discord roles with Minecraft ranks)
- Embed Links
- Read Message History
- Use Slash Commands
Copy the generated URL, paste it into your browser, and select the Discord server you want the bot to join. Authorize it and confirm.
Step 3, Install DiscordSRV on Your Minecraft Server
Download the latest DiscordSRV jar from SpigotMC or the project's GitHub releases page. Drop it into your server's plugins/ folder and restart. DiscordSRV will generate its config files on first boot.
For a detailed walkthrough of DiscordSRV configuration, see our dedicated DiscordSRV setup guide.
Minimal Configuration
Open plugins/DiscordSRV/config.yml and set the following:
BotToken: "YOUR_BOT_TOKEN_HERE"
Channels:
global: "CHANNEL_ID_HERE"
Replace YOUR_BOT_TOKEN_HERE with the token you copied from the Developer Portal. To get the channel ID, enable Developer Mode in Discord (Settings > Advanced > Developer Mode), then right-click the channel and select Copy Channel ID.
Restart the Minecraft server. If the bot comes online in Discord and you see a startup message in the configured channel, your discord bot minecraft server bridge is live.
Step 4, Test and Harden
Send a message in the linked Discord channel, it should appear in Minecraft. Type something in Minecraft chat, it should relay to Discord. If either direction fails, check the server console for DiscordSRV errors. The most common issues are:
- Invalid token, regenerate and paste again, making sure there are no trailing spaces.
- Missing intents, go back to the Developer Portal and enable all three privileged intents.
- Wrong channel ID, double-check you copied the channel ID, not the server ID.
Security Best Practices
Never commit your bot token to a public Git repository. If you use version control for your server configs, add config.yml to .gitignore. Rotate your token immediately if it is ever exposed, anyone with it can impersonate your bot. Restrict the bot's Discord permissions to only what it needs; avoid granting Administrator.
Going Further
Once the basic bridge is running, explore these extensions:
- Send server status embeds to Discord automatically.
- Sync Discord roles with Minecraft ranks using DiscordSRV or a permissions plugin like LuckPerms.
- Add slash commands for whitelist management, player lookups, and more.
A well-configured discord bot minecraft server setup turns your community into a 24/7 hub, not just a place people visit when the game is running.
Want to see Discord integration done right? Join Astroworld MC, IP play.astroworldmc.com, Java + Bedrock.