DiscordSRV

Connects the server chat with Discord — players and Discord see one conversation.

← Plugins Appearance and chat license GPL-3.0-or-later guide for DiscordSRV 1.28.x (Paper/Spigot)

Download from the author Source code 524 478 download from the author autor Scarsz

What does it do?

DiscordSRV connects a Minecraft server with Discord: what is written in-game appears in a Discord channel, and what is written there is seen by players in-game. Discord thus stops being a side place and becomes a second window of the server.

In addition to chat, it can also forward events: player joins and quits, advancements, deaths, server start and stop, listing players online in the channel name. All those texts are in the messages.yml file, where you can rewrite every message in Czech.

The second major part is account linking: a player types /discord link in-game, receives a code, and sends it to the bot in a direct message. The server then knows which Discord belongs to which player — and based on that it can assign roles (for example, VIP on Discord according to rank in-game).

DiscordSRV needs its own bot. You create it on the Discord Developer Portal, insert its token into the configuration, and invite it to your server with permissions to read and write messages. The token is a secret — never put it in a public repository or in chat.

The most useful are setting up account linking, forwarding events, and roles according to rank. On the contrary, never enable forwarding of private messages — players would stop writing to each other if they knew a public channel could see it.

A known experience from Czech servers: after installation, the messages are in English (advancements, joins, deaths). They are all in messages.yml and can be translated in a moment — players notice it and the server feels more homey.

Installation

  1. Create a bot: on discord.com/developers/applications create an application, in it the Bot section, and copy the token. Store it safely.
  2. In the bot settings, enable both intent toggles (Privileged Gateway Intents) — without them the bot won't see message content.
  3. Invite the bot to your Discord: in OAuth2 create a link with permissions to read and write messages and add it to the server with the bot.
  4. In your Discord, enable Developer Mode (Settings → Advanced) and copy the server ID (by right-clicking its name) and the chat channel ID.
  5. Download DiscordSRV from modrinth.com/plugin/discordsrv or from dev.bukkit.org and upload the .jar to the plugins folder.
  6. Restart the server and open plugins/DiscordSRV/config.yml — insert the token, server ID, and chat channel ID.
  7. Set what should be forwarded: in-game chat, Discord messages, events (joins, achievements, deaths), and the player list into the channel name.
  8. Reload the configuration (/discordsrv reload) and write something in game — the message must appear on Discord, and vice versa.
  9. Open plugins/DiscordSRV/messages.yml and translate the messages into Czech. After editing, run /discordsrv reload.
  10. Set up account linking: in game /discord link, send the code to the bot in a private message and verify that it replied.
  11. If you want roles based on in-game rank, set in the configuration which group from LuckPerms corresponds to which Discord role.
  12. Check the safeguards: private messages (/msg) must not be forwarded to Discord. Decide that deliberately, not by mistake.

Permissions

Permissions are granted to players or groups — most often with a command /lp user <player> permission set <node> true (LuckPerms). A node that is not in the list is unknown to the plugin.

Permissions What does it allow?
discordsrv.player basic commands (/discord)
discordsrv.chat chat from Discord to the game
discordsrv.link link your account (/discord link)
discordsrv.admin plugin administration (/discordsrv reload and more)
discordsrv.* absolutely everything (admin only)

Commands

Type it in chat with slashes as well. Where is it? <player> or <uzel>, fill in your own value without brackets.

Command What does it do?
/discord help and link status
/discord link generates a code for linking your account (you send the code to the bot in a private message)
/discord unlink unlinks your account
/discord linked lists linked accounts
/discordsrv reload reloads the configuration and texts (after editing messages.yml)
/discordsrv broadcast sends a message to linked channels
/discordsrv status bot connection status
On Discord, linking is done with a command or by private message to the bot, depending on the server settings

Configuration and common mistakes

The bot token is a secret. If you accidentally make it public, go to the Developer Portal and have the token regenerated (Regenerate) — otherwise anyone can control your bot.
Enable both intents for the bot (Privileged Gateway Intents). Without them, messages from Discord are not forwarded and it looks like a plugin error.
The messages are in English after installation. You can find them in messages.yml and translate them — it is the fastest way to make the server feel homey.
Never enable forwarding of private messages (/msg) to a public channel. Players must be sure they can write without an audience.
A list of online players in the channel name is nice, but the channel gets renamed repeatedly and Discord limits that. Once every few minutes is enough.
Account linking is the basis for roles by rank: without it, Discord doesn't know who is who, and roles can't be assigned automatically.
When the bot doesn't respond, go through the order: token, server invite, channel ID, bot permissions in that channel. Most problems are in one of those four steps.

Who uses it?

Servers from our list that use this plugin:

Do you use it on your server? Write to us and we'll add it to the list.

Similar plugins

TAB
Player list, name above the head, and a text bar — who is who and what is happening.
SkinsRestorer
Restores players' skins — even on an offline server, where they would otherwise run around without a head.

Where does the guide come from?

The guide is our own and is based on the author's documentation. We describe permissions and commands as facts, we don't make anything up — if plugin changes after an update, the guide may be out of date. (version DiscordSRV 1.28.x (Paper/Spigot)) Did you find an error? Write to us and we'll fix it.

License: GPL-3.0-or-later. The file isn't hosted with us; it's downloaded from the author at (Scarsz) — that way the current version is always available.

Copied