Welcome to the Hangar Open Beta. Please report any issue you encounter on GitHub!
Seamless bidirectional chat bridge between Minecraft and Discord. Relay messages, player events, server startup/shutdown
DiscordRelay
DiscordRelay is a Minecraft Paper 1.21.1 plugin that creates a bidirectional chat bridge between your Minecraft server and a Discord channel.
Features
- Relay chat messages from Minecraft to Discord and vice versa.
- Server start-up and shutdown notifications in Discord.
- Display player join and leave events in Discord.
- Show player death messages in Discord.
- Show player avatars in Discord messages.
/list
command in Discord to see online Minecraft players./uptime
command in Discord to check server uptime.
Installation
- Place the
.jar
file in your Minecraft server'splugins
folder - 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 reload
to reload the plugin.
Discord Bot Setup
- 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 theAdvanced
section, 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 Token
andChannel ID
intoplugins/DiscordRelay/config.yml
.
Configuration
- Open the
plugins/DiscordRelay/config.yml
file. - Set
discord-bot-token
to your bot's token. - Set
discord-channel-id
to 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'
In-game Commands
/discordrelay reload
: Reloads the plugin configuration.
Discord Commands
/list
: Shows the list of online Minecraft players./uptime
: Displays the current uptime of the Minecraft server.
Support Me
Donations will help me with the development of this project.
One-off donation: https://ko-fi.com/lolwhatyesme
Patreon: https://www.patreon.com/lolwhatyesme
Pinned Versions
Pages
Members
Owner