- Works with
- Paper, Purpur, Spigot
What it does
DiscordSRV sends Minecraft chat to a Discord channel and Discord messages back into the game. It can also post joins, leaves, deaths and server start and stop, mirror the console to a staff channel, and link players' Discord and Minecraft accounts.
1. Make a Discord bot
- Go to the Discord Developer Portal, create a New Application and give it your server's name.
- Open Bot and copy the token. Keep it secret: anyone with it controls your bot.
- On the same page, turn on Server Members Intent and Message Content Intent. Without these the bot connects but can't read messages.
- Open OAuth2, choose the bot scope with permission to read and send messages and manage webhooks, and open the link it makes to add the bot to your Discord server.
2. Install and configure
- Put the DiscordSRV jar in
pluginsand restart once so it makes its config. - Edit
plugins/DiscordSRV/config.yml:
BotToken: "your-token-here"
Channels: {"global": "123456789012345678"}
To get a channel ID, turn on Developer Mode in Discord (Settings, Advanced), right-click the channel and choose Copy Channel ID.
- Restart the server. The console shows the bot connecting, and a message appears in the channel.
Linking accounts
Players run /discord link in game and send the code to the bot. Linking lets you sync roles and ranks between Discord and LuckPerms.
Common problems
"Disallowed intents": turn on Server Members Intent and Message Content Intent in the Developer Portal, then restart.
The bot is online but messages don't come through: check the channel ID is right and the bot can see and post in that channel.
"Invalid token": copy the token again. Reset it in the Developer Portal if you think it's leaked.
Performance
Light. Chat goes out on its own thread, so a slow Discord connection doesn't lag the game.
Questions
Is there a Fabric version?
DiscordSRV is a Paper and Spigot plugin. Fabric servers use mods such as Discord Integration for the same job.
Can I run console commands from Discord?
Yes, by setting a console channel in the config. Restrict who can see that channel, because anyone in it can run any command.