How to connect your Minecraft server to Discord
A lot of server communities live on Discord. DiscordSRV is a plugin that links the two: what players say in Minecraft appears in a Discord channel, and what is said in that channel appears in the game. It also announces joins and leaves and lets staff run commands from Discord if you allow it.
What you need
- A Paper server where you can install plugins, see how to install plugins.
- A Discord server where you are an administrator.
- About ten minutes.
Step 1: make a bot
- Go to the Discord Developer Portal and create a New Application. Name it after your server.
- Open the Bot tab and create the bot. Copy its token and keep it secret: anyone with the token controls the bot.
- On the same page, switch on the Server Members Intent and the Message Content Intent. DiscordSRV needs them to read messages.
- Open OAuth2, choose the
botscope, give it the permissions to view, send and manage messages in the channel, and use the link to invite it to your Discord server.
Step 2: copy the channel ID
In Discord, switch on Developer Mode (Settings, Advanced). Then right-click the channel you want to link and choose Copy Channel ID.
Step 3: install and configure DiscordSRV
- Put the DiscordSRV jar in
pluginsand start the server once, then stop it. It createsplugins/DiscordSRV/config.yml. - Open
config.ymland set the bot token in theBotTokenline. - In the
Channelssection, set theglobalchannel to your channel ID, in quotes. - Start the server. Messages should now flow both ways.
On Saryno, DiscordSRV is a one-click add-on, and the configuration file is in the file manager.
When it will not connect
| Symptom | Likely cause |
|---|---|
| The log says the token is invalid | The token was pasted wrongly or reset. Copy a new one. |
| The bot is online but says nothing | It cannot see or write in the channel. Check the channel permissions. |
| Discord messages do not reach the game | The Message Content Intent is off. |
| Names or roles do not show | The Server Members Intent is off. |
Tips
- Use a separate channel for the game chat, and one for staff commands if you enable them.
- Do not give the bot more permissions than it needs.
- If your chat has a prefix plugin, DiscordSRV can show ranks too, see how to set up LuckPerms.
- Put your Discord invite on your server listing and in the MOTD, see the MOTD generator.