WebhookCraft – Discord Bridge (GTNH/Forge 1.7.10)
This guide explains how to install and configure WebhookCraft, the mod that:
Sends Minecraft server events to Discord via webhooks.
Launches a packaged Python Discord bot that:
Bridges chat between Discord ↔ Minecraft.
Lets authorized users run Minecraft commands from Discord.
Provides utilities like
!ping,!status,!list,!cmd, and!help.
Works with modpacks such as GregTech: New Horizons. The mod extracts the Python bot to
./botin the server root and spins up a local WebSocket bridge to talk to it.
1) Requirements
Forge 1.7.10 server (GTNH compatible).
Java 8 on the server.
Python 3.7+ on the same machine (when
bot.enabled = true). Withpython_command: "auto", the mod auto-detectspython3(Linux/macOS) orpy -3/python.exe(Windows).A Discord bot token and/or a Discord webhook URL, depending on your use (bot, webhook, or both).
2) Quick Install
Drop the WebhookCraft JAR into the server's
mods/folder.Start the server once and then stop it.
The mod creates
./webhookcraft.jsonin the server root.It also extracts the Python bot into
./bot(based on the packagedbot.index).
Edit
./webhookcraft.jsonand fill in your settings (see Configuration below).Start the server again.
Console should show messages like:
WS Bridge listening…
Python bot launched in ./bot
In Discord, try
!help,!ping, etc.
GTNH (dev/run): if you run from a
run/directory, bothwebhookcraft.jsonand./botwill be created inside thatrun/folder.
3) Configuration (webhookcraft.json)
IMPORTANT: JSON does not allow comments. Remove any
// …or trailing commas.
Minimal valid example:
{
"format": { "server_name": "your_server_name", "include_dimension": false },
"network": { "timeout_ms": 6000 },
"webhooks": [
{
"name": "discord-main",
"url": "https://discord.com/api/webhooks/XXXX/XXXXXXXXXXXXXXXXX",
"enabled": true,
"events": ["chat","join","leave","death","server_start","server_stop","pvp_kill"]
}
],
"ws": { "enabled": true, "bind": "127.0.0.1", "port": 8765, "secret": "auto" },
"debug": { "events": false },
"bot": {
"enabled": true,
"python_command": "auto",
"workdir": "bot",
"script_name": "bot_ws_bridge.py",
"env": {
"DISCORD_TOKEN": "YOUR_TOKEN",
"CHANNEL_MAIN": "123456789012345678",
"ALLOW_PIP": "1",
"MC_CMD_USERS": "663815222854942721,987654321012345678"
}
},
"active_language": "en",
"url": [
"https://i.imgur.com/OXAkYlJ.jpeg",
"https://i.imgur.com/CgRvwzj.jpeg",
"https://i.imgur.com/bZ2QRXE.jpeg"
],
"language": {
"en": {
"ingame_prefix": "[InGame]",
"welcome": "Welcome",
"goodbye": "Goodbye",
"server_start": "Server started",
"server_stop": "Server stopped",
//... rest of data :-)
}
}
}Key fields
format.server_name: prefix shown in Discord (e.g.[GTNH]).format.include_dimension: append(dim X)to certain in-game messages.webhooks[].url: a Discord webhook https:// URL. Set"enabled": falseif unused.ws.*: internal Java ↔ Python bridge. Keep127.0.0.1:8765unless you know what you're doing."secret": "auto"generates a per-boot secret.bot.enabled: set totrueto launch the packaged Python bot.bot.python_command:"auto"tries to detect Python (Linux/macOS:python3, Windows:py -3/python).bot.workdir: where the.pyfiles are extracted and executed (default./bot).bot.script_name: bot entry point (bot_ws_bridge.py).bot.env:DISCORD_TOKEN: your Discord bot token.CHANNEL_MAIN: numeric Discord channel ID.ALLOW_PIP:"1"allows auto-install of missing Python deps.MC_CMD_USERS: comma-separated Discord user IDs authorized to use!cmd.
4) Discord Bot Commands
!help– list bot commands.!ping– show Discord latency and WS status.!status– show bot status and language/avatar info.!list– run/liston the server and display online players.!cmd– run a Minecraft command and return its output. Restricted toMC_CMD_USERS. (Includes rate limiting/queueing to avoid flood).
5) In-Game Server Commands
/webhookdebug– enable/disable the EventSniffer (verbose event logging) or show status. (Permission level 2)/webhookconfig– manage configuration:set language active enset bot.env DISCORD_TOKENset bot.env CHANNEL_MAIN 123456789012345678set webhook discord-main.enabled trueget ws portsave(writeswebhookcraft.json)list language/list bot.env/list webhook
6) Bot Packaging
Python bot files are embedded in the JAR under
assets/webhookcraft/bot/.assets/webhookcraft/bot.indexlists (one per line) which files to extract to./botat server start.The entry point should be
bot_ws_bridge.py(configurable viabot.script_name).You can replace the bot with any Python implementation as long as:
The entry point matches
bot.script_name.It reads the expected env vars (
DISCORD_TOKEN,CHANNEL_MAIN,WS_URL,WS_SECRET,ALLOW_PIP,MC_CMD_USERS).It connects via WebSocket to
WS_URLand signs withWS_SECRET.If you change embedded files, update
bot.indexin the JAR so the extractor copies them.
7) Discord Intents
Enable MESSAGE CONTENT INTENT for your bot in the Discord developer portal so it can read messages and commands.
8) Security Notes
online-mode=falseallows username spoofing; keep ittruefor public servers.Do not share tokens or
webhookcraft.json. The mod masks some values in logs.Keep the WebSocket bound to
127.0.0.1if the bot runs on the same host.
9) Troubleshooting
no protocol: your_webhook→ The webhook URL is invalid. Paste a valid Discordhttps://webhook or disable the webhook (enabled=false).ValueError: invalid literal for int() 'your_channel'→CHANNEL_MAINmust be a numeric channel ID.Resource not found: /assets/webhookcraft/bot.index→ The JAR lacksbot.indexunderassets/webhookcraft/. Fix your packaging.Bot doesn't start → Check
python_command(try"auto"), ensure Python 3 is installed, and inspect[WebhookCraft/PyBot]logs.!cmdignored → Ensure your Discord user ID is listed inMC_CMD_USERSand!pingshows WS✓ Connected.
10) Update / Uninstall
Update: replace the JAR in
mods/and restart. By default the extractor does not overwrite existing files in./bot. To force a refresh, delete./botbefore starting or bump names inbot.index.Uninstall: remove the JAR from
mods/. Optionally deletewebhookcraft.jsonand./bot.
If something breaks, start with !ping, then check server logs and [WebhookCraft/PyBot] output.

