This is a Sponge plugin to integrate Minecraft server with a Discord channel.
- Player's chat messages in Minecraft are sent a specified Discord channel, and chat messages in that Discord channel are also sent to online players in Minecraft.
- Each player can log in to their own Discord account, so that chat messages show under their names.
- Server owners can setup a default account as a bot for all unauthenticated players and server announcements.
- Emoji is converted between Minecraft and Discord format. Details are showed in EMOJI.md.
[GETTING STARTED.md](GETTING STARTED.md)
Build Sponge-Discord
- Clone this repository
- Run
gradle
(orgradlew
for Windows) - The jar file will be in
build/libs/Sponge-Discord-{version}-all.jar
.
/discord login <email> <password>
: 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 logout
: logout of Discord and unbind the Discord account from the Minecraft account./discord default login <email> <password>
: login to a default Discord account. This account will be used as a bot for unauthenticated players to send and receive Discord messsages in Minecraft./discord default logout
: logout of the default Discord 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 reload
: reload configurations.
A short summary is below:
Command | Shorthand | Permission |
---|---|---|
/discord login <e> <p> |
/d l <e> <p> |
|
/discord logout |
/d lo |
|
/discord default login <e> <p> |
/d d l <e> <p> |
spongediscord.default |
/discord default logout |
/d d lo |
spongediscord.default |
/discord broadcast <message> |
/d b <message> |
spongediscord.broadcast |
/discord reload |
/d reload |
spongediscord.reload |
Some ideas for future commands
Command | Note |
---|---|
/discord config |
Show current configuration |
/discord status |
Show current Discord account |
Channel
: the ID of the Discord number (usually a 18-digit number)InviteCode
: an invitation code that does not expire (usually the part afterhttps://discord.gg/
in the invitation link)JoinedMessage
: (optional) a message that will be posted to Discord when a player joins the serverLeftMessage
: (optional) a message that will be posted to Discord when a player leaves the serverMessageInDiscordPrefix
: (optioal) a prefix for message from Minecraft to Discord. You can use Discord markdown format here.MessageInMinecraftPrefix
: (optional) a prefix for message from Discord to Minecraft. You can use Minecraft formatting here.TokenStore
: eitherInMemory
(mainly for testing) orJSON
-
Get the URL to the channel
- If you are using the Dicord app, simply right click on on channel name and choose copy link and paste the link some where
- If you are not using the Discord app, navigate to the channel from discordapp.com and look at the address bar of your browser
-
The link should be in this format
https://discordapp.com/{serverID}/{channelID}
, so the channel ID is the last 18 digit number in this link.
- Group-based prefix