Description
Discord Connect Template
Discord Connect Template is a server-side Minecraft Forge mod that sends Minecraft server and player events to a customizable Discord integration API.
This project is provided as a template for server administrators and developers who want to connect Minecraft with Discord using their own API implementation.
## Features
- Sends server start and stop events
- Sends player join and leave events
- Sends periodic heartbeat events
- Generates Discord account linking codes with
/discord link - Supports English and Japanese in- game messages
- Uses configurable API endpoints and authentication
- Skips API requests when no API URL is configured
Configuration
The mod does not include a hosted API, database, database credentials, or private server configuration.
After starting the server once, edit the generated configuration file:
``text config/discord_connector- server.toml
Configure the following values:
server_id = "your-server-id"
api_url = "https://your-api.example.com"
api_key = "your-api-key"
``
The default configuration leaves api_url and api_key empty. API communication remains disabled until you provide your own compatible API.
In-Game Usage
Run the following command in Minecraft:
/discord link
The mod will generate a temporary linking code and display the Discord command to use:
/link code:YOUR_CODE
The linking code is valid for 10 minutes.
API Endpoints
A compatible API should implement the following endpoints:
- POST /v1/minecraft/events/server- start
- POST /v1/minecraft/events/server- stop
- POST /v1/minecraft/events/join
- POST /v1/minecraft/events/leave
- POST /v1/minecraft/heartbeat
- POST /v1/minecraft/link-code
The request and response formats are documented in the project source and README.
Important Notes
- This mod does not provide a hosted API or database.
- You are responsible for hosting and securing your own API.
- Never publish API keys, database credentials, or private configuration files.
- This mod is intended for server-side and client-side use.
License
See the included license file for usage and redistribution terms.


