A small, fast, two-way bridge between PumpkinMC and Discord.
- Pumpkin chat and events go to Discord through a webhook.
- Discord channel messages return to Pumpkin through Discord's authenticated REST API.
- Chat, join, leave, death, advancement, startup, and shutdown formats are configurable in TOML.
- Event handlers are non-blocking, and Discord polling runs as a scheduled task.
- The WebAssembly plugin requests only its private data-folder and outbound HTTP permissions.
Discord webhooks can send messages but cannot receive channel messages. The reverse direction therefore uses a bot token and channel messages endpoint. No token or webhook secret is included in this repository.
- Download
CalabazaDiscord.wasmfrom the latest release. - Put it in Pumpkin's
plugins/directory and start Pumpkin once. - Open the generated
plugins/data/CalabazaDiscord/config.toml(the exact capitalization follows Pumpkin's data-folder naming). - Add a Discord webhook URL for Pumpkin -> Discord.
- For Discord -> Pumpkin, create a bot, invite it to the channel, and add its token and the channel ID. Grant View Channel and Read Message History. Enable Message Content intent in the Discord developer portal if Discord requires it for your application.
- Restart Pumpkin.
The first poll records the newest Discord message without replaying old channel history. New messages are then relayed in chronological order. Messages created by bots and webhooks are ignored by default to prevent loops.
The generated file matches config.example.toml. Available placeholders are:
| Format | Placeholders |
|---|---|
chat |
{player}, {message} |
join, leave, death |
{player} |
advancement |
{player}, {advancement} |
discord_chat |
{author}, {message} |
poll_interval_ticks is clamped to at least 20 ticks (approximately one second), and max_message_length is clamped to 1-1900 characters. Discord allowed mentions are disabled in webhook payloads to prevent unwanted pings.
Install Rust and the component-model WASI target, then build:
rustup target add wasm32-wasip2
cargo build --release --lockedThe artifact is written to target/wasm32-wasip2/release/calabaza_discord.wasm.
The Pumpkin dependency is pinned to a known commit because Pumpkin's plugin API is still evolving. Update that revision and rebuild when targeting a newer Pumpkin server revision.
MIT