Server-side FabricMC mod featuring a Discord <-> Minecraft chat bridge for the Tellurium network, with multiple features not found in other chat bridge mods.
Built with JDA, Mineskin, and Oro-Config.
- This is my first time using Java, so this code might not have the best practices in it.
Broadcast messages from multiple Discord channels into Minecraft, from multiple different servers! This also features Discord to Discord chat bridging, so you won't miss a message. This also supports attachments! Upload images and files, and they will be sent through too, and if a message contains an attachment, this will show in Minecraft chat too!
Discord webhooks allow us to set our own avatar for each message, which means we can set them based on the player who talks. Thanks to Mineskin, we are able to generate a rendered image of the player's head.
Broadcast player death messages, join and leave messages, and server start/stop messages straight to Discord.
*
*Discord formatting was broken in this screenshot. It has since been updated to _Skypie_ was shot by Skeleton
Commands to check the server's health (TPS, and MSPT), the current players online, and the bot's latency, are all prebuilt into the Discord bot.
An automatically generating config file, with the ability to customize everything! See configuration below.
Logs all messages in the server console, as well as errors and initialization.
.jar
file at either the GitHub releases page,
or download the artifact from the latest build..jar
file into server/mods
and run the server using your startup script.server/config/tellurium-chat-bridge.json
(See configuration for more)Example configuration file:
{
"tellurium_chat_bridge_config": {
"discord_bot_token": "Bot token here",
"server_name": "TMP",
"discord_channel_ids": [
"866299513476343962",
"836222513389183949",
"821686696895737887"
],
"webhook_urls": [
"https://discord.com/api/webhooks/821686696895737887/FQO9otfxTI6Ml7mMY6dt-5IpkS81KhYnvz-EgmcwfFm7G1_PNg8cvwAFOjD4QaVC_cdY",
"https://discord.com/api/webhooks/866299513476343962/35kSpD_NjepvJ6WOXY9FAHZ1l7bWOUkxelyQieLPKUPtjjzXm4dwf7AdsNv45HIpPA2A"
],
"discord_to_minecraft_formatting": "{player_name} §9§lD §r§8»§r {attachment} {text}",
"bot_prefix": "!"
}
}
(Yes, these webhook URLs are fake)
discord_bot_token
- Your Discord bot token.
server_name
- The name of the server (for example SMP, CMP, etc).
discord_channel_ids
- An array of Discord channel ids. Make sure to add a comma after each item.
webhook_urls
- An array of Discord webhook URLs. Make sure to add a comma after each item.
discord_to_minecraft_formatting
- Formatting for what Minecraft chat sees for Discord messages.
property | use |
---|---|
{player_name} |
the author's name of the Discord message |
{attachment} |
where <Attachment> shows when an attachment is sent through Discord |
{text} |
the raw message that was sent to Discord |
bot_prefix
- The prefix that the bot uses when typing commands.
command | alias | use |
---|---|---|
ping |
ping |
Returns bot latency |
online |
online , players , playing |
Returns current online players |
health |
health , stats , tps , mspt |
Returns server health (tps & mspt) |