Skip to main content
← All Guides
Server setup

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.

How the chat bridge works
  1. 1
    Create the bot application
    Open 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.
  2. 2
    Invite the bot to your server
    Under 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.
  3. 3
    Install DiscordSRV
    Drop DiscordSRV.jar into the plugins folder of your Paper or Spigot server and restart so it writes plugins/DiscordSRV/config.yml.
  4. 4
    Paste token and channel ID
    In 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).
  5. 5
    Reload and test
    Run /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>.
DiscordSRV · console
[DiscordSRV] Enabled · linked to #minecraft-chat
[DiscordSRV] Bot logged in as AstroBridge#4417
In-game chat
<Steve> anyone up for the nether run?
<Alex> yep, gimme 2 min
#minecraft-chat
Steve anyone up for the nether run?
Alex yep, gimme 2 min
@you (from Discord) on my way
<Discord> <you> on my way
> reload plugins after editing config.yml
$ /discord reload

What you need

DiscordSRV.jar
config.yml
Bot token
Channel ID

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.

Go to the OAuth2 > URL Generator tab. Under Scopes, select bot and applications.commands. Under Bot Permissions, grant at minimum:

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:

  1. Invalid token, regenerate and paste again, making sure there are no trailing spaces.
  2. Missing intents, go back to the Developer Portal and enable all three privileged intents.
  3. 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:

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?

The channel ID is usually wrong or unmapped. Recopy it via right-click Copy ID, paste it under Channels: global in config.yml, and run /discord reload. Confirm the bot can actually see and post in that channel.
?

Discord messages do not show in-game. What is missing?

Enable the Message Content privileged intent in the Developer Portal under Bot, then restart. Without it the bot cannot read messages to relay them back into the game.
?

Do I need Developer Mode in Discord?

Yes, to copy IDs. Turn on Settings > Advanced > Developer Mode, then right-click any channel and choose Copy ID for the value DiscordSRV expects.
?

Can I bridge more than one channel?

Yes. DiscordSRV supports a console channel for logs plus the global chat channel, and add-on plugins extend it to staff or per-world channels. Map each under its own key in config.yml.
?

Is DiscordSRV safe to leave the token in config.yml?

Keep config.yml off public backups and never paste it in screenshots. If a token leaks, regenerate it in the Developer Portal under Bot, then update config.yml and reload.
?

Does this work on Fabric or modded servers?

DiscordSRV targets Spigot, Paper, and Purpur. For Fabric use a mod like dcintegration; the bot-creation and channel-ID steps are the same, only the install location differs.

Blocks and items in this guide

Target in MinecraftTarget

Target is named in the guide above. Look them up in the item database.

More guides on this site

Guides that go with this one

How to Set Up DiscordSRV
Connect your Minecraft server to Discord with DiscordSRV, bot setup, channel linking, account linking,...
Minecraft Multiverse Tutorial
Use Multiverse-Core to run multiple worlds on one Minecraft server, create, import, link portals, and...
How to Install a Datapack
Drop a datapack .zip into world/datapacks, run /reload, and get "Loaded N data pack(s)". Step-by-step...
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...
EssentialsX Config Guide: Commands, Kits, Warps & Economy
Full EssentialsX setup guide covering config.yml, kit creation, warp management, economy settings, chat...
Vault Economy Setup: Link EssentialsX, CMI & Shop Plugins
Complete Vault setup tutorial explaining how Vault bridges economy plugins, permission systems and chat...
Hosting
Managed Hosting
Skip the setup: a managed server online in minutes.
Database
Command Reference
Syntax, arguments and examples for every command.
Database
Item Database
Every item with its stats, IDs, recipes and uses.
Guides
More Server & Admin guides
Run a server: setup, hosting, permissions, worlds and crossplay.