BlazeBans/Integrations

Discord webhooks

Post punishments to a Discord channel. Configured in `discord.yml`, and off by default.

A webhook gives you a searchable moderation log outside the game, which is where most appeal conversations happen anyway.

Setting it up

1. Create the webhook in Discord.

Open the channel you want, then Edit Channel, Integrations, Webhooks, New Webhook. Name it, pick the channel, and copy the URL.

Use a private staff channel. Punishment posts include player names, reasons, and staff names.

2. Paste it into discord.yml.

yaml
enabled: true
webhook-url: "https://discord.com/api/webhooks/000000/your-token-here"

3. Reload.

minecraft
/blazebans reload discord.yml

4. Test it.

minecraft
/warn YourName Testing the webhook

The embed should appear within a second or two. Revoke it afterwards.

Appearance

yaml
webhook:
  username: "BlazeBans"
  avatar-url: ""

appearance:
  accent-color: "#ff4d00"

messages:
  footer: "BlazeBans"
  footer-icon-url: "https://i.postimg.cc/CxvPh4SM/blaze-logo.png"

username and avatar-url are what Discord shows as the sender. accent-color is the embed's left border. Change all four to your server's branding.

Every embed shows the punished player's skin beside the summary.

Choosing what posts

yaml
events:
  punishment-created: true
  punishment-revoked: true
  muted-chat: true
  muted-command: true
EventFires when
punishment-createdA punishment is issued
punishment-revokedOne is revoked or expires
muted-chatA muted player's chat is blocked
muted-commandA muted player tries a blocked command

The two muted events are noisy on a busy server and useful during an incident. Turn them off if the channel becomes unreadable.

yaml
punishment-types:
  ban: true
  ip-ban: true
  mute: true
  ip-mute: true
  voice-mute: true
  warn: true
  kick: true

Filter by type on top of that. A common setup posts bans and mutes but not kicks and warns, which are frequent and rarely need reviewing later:

yaml
punishment-types:
  ban: true
  ip-ban: true
  mute: true
  ip-mute: true
  voice-mute: true
  warn: false
  kick: false

Message format

The bodies use Discord markdown, not MiniMessage. Placeholders in {curly_braces} are filled in by BlazeBans.

yaml
messages:
  punishment:
    title: "{broadcast_action}"
    summary: |-
      **Player:** {victim_name}
      **Record:** `{punishment_id}` | {punishment_type}{punishment_duration_line}
    body: |-
      **For:** {punishment_reason}
      ---
      **{broadcast_actor}:** {staff_name}
      **Server:** `{server}`{expires_line}

title is the heading. summary sits above the detail fields, beside the player's skin. In body, each section separated by --- becomes its own embed field.

Player and staff names are rendered as inline code, so a name containing Discord markdown cannot reformat the message around it.

{expires_line} and {punishment_duration_line} only appear when they apply, so a permanent ban does not get an empty "Expires" row.

A proof URL becomes an "Open proof" button under the embed.

Muted chat and command formats

yaml
messages:
  muted-chat:
    title: "Muted chat attempt"
    summary: "**Player:** {victim_name}"
    body: |-
      **Attempted message**
      `{failed_chatmessage}`

  muted-command:
    title: "Muted command attempt"
    summary: "**Player:** {victim_name}"
    body: |-
      **Attempted command**
      `{blocked_command}`

Timeouts

yaml
http:
  timeout-seconds: "10"

How long BlazeBans waits for Discord before giving up on a call. Webhook delivery never blocks a punishment: if Discord is slow or down, the punishment still happens and the post is dropped.

Silent punishments

--silent suppresses the Discord post along with the in-game broadcasts. Something issued quietly stays quiet everywhere.

If you want silent punishments logged to Discord anyway, that is not currently separable. The alternative is to check /history when reviewing.

Keeping the URL private

A webhook URL is a credential. Anyone holding it can post to your channel as your webhook.

BlazeBans redacts webhook-url from /blazebans dump, so diagnostics are safe to share. The file itself is not. If it leaks, delete the webhook in Discord and make a new one; the old URL stops working immediately.

Troubleshooting

Nothing posts. Check enabled: true, check the URL is complete, and check the event and type are both enabled for what you tested. Console logs a warning when a webhook call fails.

Some punishments post and others do not. Check punishment-types for the type in question, and check whether the punishments that vanish were issued with --silent.

The embed is missing fields. Your body has no --- separators, so everything is one field. Add them where you want a break.

The colour is wrong. accent-color needs quotes: "#ff4d00". Unquoted, the # starts a YAML comment and the value is empty.