Link your Minecraft server to Discord with DiscordSRV

Let your Minecraft server chat and a Discord channel talk to each other through DiscordSRV, with your own bot and a console channel for staff.

EliteStarHosting Team2 November 20263 min read

With DiscordSRV, messages from your Minecraft server chat show up in a Discord channel, and the other way around. Joins, leaves and deaths appear there too. DiscordSRV works on Paper and Purpur. Version 1.30.5 supports Minecraft 1.21.11 and 26.1 up to and including 26.3.

1. Install DiscordSRV

  1. In the game panel, go to Plugins and search for DiscordSRV.
  2. Click Select version on DiscordSRV by Scarsz, pick your version and click Install plugin.
  3. Restart your server. DiscordSRV then creates the plugins/DiscordSRV folder with the file config.yml.

DiscordSRV by Scarsz in the Plugins tab, with the Select version button

2. Create a bot

  1. Go to the Discord Developer Portal and click New Application.
  2. Open Installation, turn off User Install and set Install Link to None.
  3. Open Bot and turn on Server Members Intent and Message Content Intent. Leave Public Bot off, so nobody else can invite your bot.
  4. Click Reset Token and copy the token that appears.

The token works as your bot's password. Never share it, not even with us, and never take a screenshot of your config.yml. Has it leaked anyway? Then click Reset Token again straight away and fill in the new one.

3. Invite the bot

  1. Under General Information, copy the Application ID.
  2. Open https://discordapp.com/oauth2/authorize?scope=bot+applications.commands&client_id= in your browser, with your Application ID at the end.
  3. Pick your Discord server and click Authorize.
  4. Give the bot a role of its own. In your chat channel it needs to see and send messages. Extra features, such as syncing roles, need more permissions: the DiscordSRV guide lists which ones.

4. Set up the channel

  1. Turn on Developer Mode in Discord, under Settings in Advanced.
  2. Right-click the channel for the chat and choose Copy Channel ID.
  3. In the File Manager, open the file plugins/DiscordSRV/config.yml.
  4. Fill in your token at BotToken and the channel ID at Channels, as in the example below.
  5. Click Save Content and restart your server.
BotToken: "your-token-here"
Channels: {"global": "123456789012345678"}

Leave the word global as it is: it is the name of the chat in Minecraft, not of your Discord channel.

The editor in the File Manager (here with server.properties) and the Save Content button

A console channel, for staff only

With DiscordConsoleChannelId you link a second channel to the console. Everything you type there, your server runs with full rights. So use a private channel that only your admins can see. Commands such as op and execute are on a block list in DiscordConsoleChannelBlacklistedCommands by default.

Linking accounts

Players link their Minecraft account to Discord with /discord link. They get a code, which they send to the bot in a direct message. /discord unlink removes the link again. In MinecraftDiscordAccountLinkedConsoleCommands you set a command the server runs as soon as someone links, for example for a small reward.

Not working?

  • Check the console while the server starts. DiscordSRV reports an invalid token or missing intents there.
  • Messages from Discord don't reach Minecraft? Check that Message Content Intent is on.
  • Already using EssentialsX? Then the EssentialsX Discord module is a lighter alternative.