This is a Sponge plugin to integrate Minecraft server with a Discord channel.
- Player's chat messages in Minecraft are sent to specified Discord channels, and chat messages in specific Discord channels are also sent to online players in Minecraft.
- Admins and mods can log in to their own Discord account, so that chat messages show under their names in Discord.
- Emoji is converted between Minecraft and Discord format. Details are showed in EMOJI.md.
- Clickable URL.
- Multiple channels with custom configuration for each channel. E.g.:
- 1 public channel to send & receive messages between Discord and Minecraft
- 1 monitoring channel to record only server start/stop and player join/leave events
- 1 staff-only channel that send message one-way from Discord to Minecraft with a special announcement template
- Set game activity of the bot
- Ignore Discord messages from all bots and/or blacklist certain prefixes
- Support One-Time Password
- New in 2.3.0
- Mentions in Discord show properly in Minecraft with configurable templates
- Mentions from Minecraft are supported with permission control (check Additional Permissions)
- Attachments in Discord shows proper links in Minecraft
- Support Minecraft templates based on Discord roles
[GETTING STARTED.md](GETTING STARTED.md)
- Clone this repository
- Run
gradlew
- The jar file will be in
build/libs/DiscordBridge-{version}-all.jar
.
/discord login
: login to Discord and bind the Discord account to the Minecraft account for automatic login in the future. The email and password will not be stored; instead, the access token of the user will be stored in the config folder on the server./discord otp
: One-time password for Discord login (thanks Prototik)./discord logout
: logout of Discord and unbind the Discord account from the Minecraft account./discord broadcast
: as this plugin cannot capture server's/say
at the moment, this command is to send a message to all online players and Discord. This command requires having the default account set up./discord status
: show current connection status./discord reload
: reload configurations./discord reconnect
: reconnect Discord connection.
A short summary is below:
Command | Shorthand | Permission |
---|---|---|
/discord login |
/d l |
discordbridge.login |
/discord otp |
/d otp |
discordbridge.login |
/discord logout |
/d lo |
discordbridge.login |
/discord broadcast <message> |
/d b <message> |
discordbridge.broadcast |
/discord status |
/d s |
discordbridge.status |
/discord reload |
/d reload |
discordbridge.reload |
/discord reconnect |
/d reconnect |
discordbridge.reconnect |
Some ideas for future commands
Command | Note |
---|---|
/discord config |
Show current configuration |
/discord status |
Show current Discord account |
Configuration is stored in config.json
file.
- Global config
botToken
: App Bot User's tokenbotDiscordGame
: sets the current game activity of the bot in Discord (thanks, Vankka)tokenStore
:JSON
(default) orNONE
(user authentication will be disabled) orInMemory
(mainly for testing). This is used for player authentication.minecraftBroadcastTemplate
: template for messages in Minecraft from/discord broadcast
commandprefixBlacklist
: a list of prefix string (e.g.["!"]
) that will be ignored by the plugin (thanks, Vankka)ignoreBots
: ignore all messages from any Discord Bots (thanks, Vankka)channels
: a list of channel configurations
- Channel config
discordId
: the ID of the Discord channel (usually a 18-digit number)discord
: templates in DiscordjoinedTemplate
: (optional) template for a message in Discord when a player joins the serverleftTemplate
: (optional) template for a message in Discord when a player leaves the serveranonymousChatTemplate
: (optional) template for messages from Minecraft to Discord for unauthenticated userauthenticatedChatTemplate
: (optional) template for messages from Minecraft to Discord for authenticated userbroadcastTemplate
: (optional) template for messages in Discord from/discord broadcast
commanddeathTemplate
: (optional) template for a message in Discord when a player dies (thanks, Mohron)
minecraft
: templates in MinecraftchatTemplate
: (optional) template for messages from Discord to Minecraft. For supporting placeholders in the template, check the section Chat placeholderattachment
: (thanks, Mohron)template
: template for Discord attachments linked in MinecrafthoverTemplate
: template for the message shown when you hover over an attachment linkallowLink
: adds a clickable link in game for attachments sent via discord
emoji
: (thanks, Mohron)template
: template for custom emoji viewed in Minecraft - accepts%n
hoverTemplate
: template for the message shown when you hover over an emojiallowLink
: adds a clickable link in game to view the emoji image
mention
: (thanks, Mohron)userTemplate
: template for @user mentions - accepts%s
/%u
roleTemplate
: template for @role mentions - accepts%s
everyoneTemplate
: template for @here & @everyone mentions - accepts%s
channelTemplate
: template for @here & @everyone mentions - accepts%s
roles
:minecraft
configurations that are for a specific Discord role
You can find some example configurations in examples
folders.