DiscordRelay is a Minecraft Paper 1.21.1 plugin that creates a bidirectional chat bridge between your Minecraft server and a Discord channel.
- Relay chat messages from Minecraft to Discord and vice versa.
- Display player join and leave events in Discord.
- Show player death messages in Discord.
- Show player avatars in Discord messages.
/listcommand in Discord to see online Minecraft players./uptimecommand in Discord to check server uptime.- Server start-up and shutdown notifications in Discord.
- Download the latest release here.
- Place the
.jarfile in your Minecraft server'spluginsfolder. - Restart your server to generate the default configuration file.
- Set up your Discord bot (see Discord Bot Setup below).
- Configure the plugin (see Configuration below).
- Run
/discordrelay reloadto reload the plugin.
- Go to the Discord Developer Portal.
- Click "New Application" and give it any suitable name. You could call it "MC Bot" for example.
- Go to the "Bot" tab and click "Reset Token".
- You may have to carry out two-factor authentication. Once you see the new token, copy it to a notepad file.
- In the "Bot" tab, scroll down to the "Privileged Gateway Intents" section. Enable "MESSAGE CONTENT INTENT" and "SERVER MEMBERS INTENT".
- Go to the "OAuth2" tab, then "OAuth2 URL Generator".
- In "Scopes", select "applications.commands" and "bot". This will make a "Bot Permissions" section appear below.
- In "Bot Permissions", select:
- Read Message History
- View Channels
- Send Messages
- Copy the generated URL at the bottom of the page. Paste it into the server you want to add your bot to. You should see a message - click it and follow the steps to add your bot to your Discord server.
- If your bot does not appear in your Discord server, carry out the steps again but with another browser. There are currently issues with Google Chrome.
- At the bottom of Discord, you should see your avatar. A bit to the right of this, there is a cog wheel which says, "User Settings" if you hover over it. Click the cog wheel.
- In
App Settings, scroll down toAdvanced. In theAdvancedsection, enableDeveloper Mode. - In your Discord server, right click on the channel where you want messages to be relayed. Copy the channel ID and put it into a notepad file.
- Enter the values you obtained for your Discord's
Bot TokenandChannel IDintoplugins/DiscordRelay/config.yml.
- Open the
plugins/DiscordRelay/config.ymlfile. - Set
discord-bot-tokento your bot's token. - Set
discord-channel-idto the ID of the Discord channel you want to use for the relay. (To get the channel ID, enable Developer Mode in Discord settings, then right-click the channel and select "Copy ID") - Save the file.
Example config.yml:
discord-bot-token: 'YOUR_BOT_TOKEN_HERE'
discord-channel-id: 'YOUR_CHANNEL_ID_HERE'/discordrelay reload: Reloads the plugin configuration.
/list: Shows the list of online Minecraft players./uptime: Displays the current uptime of the Minecraft server.
Donations will help me with the development of this project.
One-off donation: https://ko-fi.com/lolwhatyesme
Patreon: https://www.patreon.com/lolwhatyesme