A Node.js bot that relays messages between a Discord channel and a Hypixel guild chat in real time. Guild chat messages appear as embeds in Discord, and Discord messages are forwarded to the in-game guild chat. Join/leave notifications are relayed as well.
| Requirement | Details |
|---|---|
| Node.js | v22 or newer |
| npm | Included with Node.js |
| Discord Bot | A bot application created at the Discord Developer Portal with the Message Content privileged intent enabled |
| Minecraft Account | A Microsoft account that owns Minecraft: Java Edition and can join mc.hypixel.net |
-
Clone the repository
git clone https://github.com/Trilleo/TriBridge.git cd TriBridge -
Install dependencies
npm install
-
Create a
.envfile in the project root with the following variables:DISCORD_TOKEN=your_discord_bot_token DISCORD_CHANNEL_ID=your_discord_channel_id LOG_CHANNEL=your_log_channel_id MINECRAFT_USERNAME=your_minecraft_email
Variable Description DISCORD_TOKENBot token from the Discord Developer Portal DISCORD_CHANNEL_IDID of the Discord channel where messages will be relayed LOG_CHANNELID of the Discord channel where admin log notifications (e.g. disconnections, reconnections) will be sent MINECRAFT_USERNAMEThe email address of the Microsoft account used for Minecraft
Start the bot:
node src/index.jsOn the first launch the bot will open a Microsoft authentication flow for the Minecraft account. Follow the instructions in the console to complete sign-in. Authentication tokens are cached in the .minecraft-auth/ directory for subsequent runs.
| Command | Category | Description |
|---|---|---|
/invite <username> |
Management | Invite a player to the Hypixel guild (admin only) |
/kick <username> [reason] |
Management | Kick a member from the Hypixel guild (admin only) |
/promote <username> |
Management | Promote a member in the Hypixel guild (admin only) |
/demote <username> |
Management | Demote a member in the Hypixel guild (admin only) |
/send <message> |
Management | Send a command or message to the Minecraft server and display the response (admin only) |
/login |
Management | Connect the Minecraft bot to Hypixel |
/adminrole add/remove <role> |
Management | Configure the global admin roles for the bot (server admin only) |
/online |
Information | Show the currently online guild members |
/ping |
Information | Display Discord API latency and Minecraft connection status |
/help |
Information | Browse all available commands by category |
- Discord → Minecraft — Messages sent in the configured Discord channel are forwarded to the Hypixel guild chat (
/gc). - Minecraft → Discord — Guild chat messages, as well as member join/leave events, are relayed back to the Discord channel as rich embeds.
- Auto-reconnect — The bot automatically attempts to reconnect to Hypixel if the Minecraft connection drops.
When new commits are pushed to the repository, pull the latest changes and reinstall dependencies:
git pull
npm installThen restart the bot:
node src/index.js