> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/BunnyNabbit/voxel-telephone/llms.txt
> Use this file to discover all available pages before exploring further.

# Discord webhook integration for Voxel Telephone servers

> Configure the DiscordWebhook integration to post game events, player connections, and announcements to a Discord channel via an incoming webhook.

The `DiscordWebhook` integration sends server events to a Discord channel by posting rich embed messages through a Discord incoming webhook URL. No bot account or OAuth is needed — just a webhook URL generated in your server's channel settings.

## How it works

When an event matching one of your configured interests is triggered, `DiscordWebhook` sends an HTTP POST to your webhook URL with the message formatted as a Discord embed. The message text appears in the embed's description field.

## Set up a Discord webhook

<Steps>
  <Step title="Open your Discord server settings">
    In Discord, go to the channel where you want events posted. Click the gear icon next to the channel name to open **Edit Channel**.
  </Step>

  <Step title="Create an incoming webhook">
    Navigate to **Integrations** → **Webhooks** → **New Webhook**. Give it a name (for example, `Voxel Telephone`) and click **Copy Webhook URL**.
  </Step>

  <Step title="Add the URL to your config">
    Paste the copied URL into the `authData.webhookUrl` field in your `config.json` (see the configuration section below).
  </Step>
</Steps>

## Configuration

Add an entry to the `integrations` array in `config.json` with `"class": "DiscordWebhook"`. The `authData` object requires a single field:

| Field                 | Type   | Description                                                 |
| --------------------- | ------ | ----------------------------------------------------------- |
| `authData.webhookUrl` | string | The full Discord incoming webhook URL.                      |
| `interests`           | array  | Event types this integration should receive.                |
| `language`            | string | Optional locale for formatted messages. Defaults to `"en"`. |

```json theme={null}
{
  "integrations": [
    {
      "class": "DiscordWebhook",
      "authData": {
        "webhookUrl": "https://discord.com/api/webhooks/1234567890/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
      },
      "interests": [
        "gameProgression",
        "playerConnection",
        "announcement"
      ]
    }
  ]
}
```

## Choosing interests for Discord

The interest types most useful for a Discord channel are:

* **`gameProgression`** — notifies your community when game turns complete.
* **`playerConnection`** — shows when players join or leave the server.
* **`announcement`** — forwards the server's periodic in-game tips to Discord.
* **`startServer`** — posts a message when the server finishes starting up.

`chatMessage` will forward every in-game chat message to Discord. Use it only if you want a full chat bridge, as it can be high-volume.

<Warning>
  Keep your webhook URL private. Anyone with the URL can post messages to your Discord channel. If it is ever exposed, delete the webhook in Discord and create a new one.
</Warning>

## Multiple Discord integrations

You can add more than one `DiscordWebhook` entry to send different event types to different channels:

```json theme={null}
{
  "integrations": [
    {
      "class": "DiscordWebhook",
      "authData": {
        "webhookUrl": "https://discord.com/api/webhooks/.../game-channel-webhook"
      },
      "interests": ["gameProgression"]
    },
    {
      "class": "DiscordWebhook",
      "authData": {
        "webhookUrl": "https://discord.com/api/webhooks/.../log-channel-webhook"
      },
      "interests": ["playerConnection", "startServer"]
    }
  ]
}
```
