How to Set Up a Discord Bot for Your Server
Run one plugin and your in-game chat and a Discord channel become the same conversation. Here is the DiscordSRV path: make the bot, paste the token, link the channel, reload.
- 1Create the bot applicationOpen the Discord Developer Portal, click New Application, then Bot. Copy the bot token under Bot. Enable the Message Content, Server Members, and Presence privileged intents.
- 2Invite the bot to your serverUnder OAuth2 > URL Generator pick scopes bot and applications.commands, give it Send Messages, Manage Webhooks, and Read Message History, then open the generated URL to add it.
- 3Install DiscordSRVDrop DiscordSRV.jar into the plugins folder of your Paper or Spigot server and restart so it writes plugins/DiscordSRV/config.yml.
- 4Paste token and channel IDIn config.yml set BotToken to your copied token and map Channels: { global: "YOUR_CHANNEL_ID" } using the Discord channel's right-click Copy ID (Developer Mode on).
- 5Reload and testRun /discord reload in the console, type in-game and watch it appear in Discord, then reply in Discord to see it relayed back as <Discord> <you>.
What you need
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.
Quick answers
Why is in-game chat not reaching Discord?
Discord messages do not show in-game. What is missing?
Do I need Developer Mode in Discord?
Can I bridge more than one channel?
Is DiscordSRV safe to leave the token in config.yml?
Does this work on Fabric or modded servers?
Blocks and items in this guide
Target is named in the guide above. Look them up in the item database.