> ## Documentation Index
> Fetch the complete documentation index at: https://pure.saauf.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Trace to Your Discord Server with Webhooks

> Set up a Discord webhook in Trace to receive real-time moderation events, ban notifications, anticheat detections, and server updates.

Connecting Trace to Discord gives your team real-time visibility into moderation activity without needing to be in-game. Once a webhook is configured, Trace sends structured event notifications - bans, warnings, anticheat detections, and server events - directly to a Discord channel of your choosing.

## What Gets Sent

When a webhook is active, Trace can deliver the following event types to your Discord channel:

* **Bans and unbans** - includes the target user, acting moderator, reason, and duration
* **Warnings** - player warning records with reason
* **Anticheat detections** - flagged events with detection type and severity
* **Server events** - server start, shutdown, and key runtime events
* **Other moderation actions** - kicks, mutes, and custom moderation entries

You choose exactly which of these event types are delivered. See [Filtering Events](#filtering-events) below.

<Warning>
  You are solely responsible for securing your webhook URL. Do not share it publicly, commit it to a public repository, or expose it in client-side code. Anyone with your webhook URL can post messages to your Discord channel. Pure Studio (the Licensor) has no access to data sent to your webhook - all payloads travel directly from your Roblox servers to Discord.
</Warning>

## Setting Up Your Webhook

<Steps>
  <Step title="Create a webhook in Discord">
    In your Discord server, go to **Server Settings → Integrations → Webhooks** and click **New Webhook**. Give it a name (for example, `Trace Moderation`), select the channel where you want notifications to appear, and click **Copy Webhook URL**.
  </Step>

  <Step title="Open TraceConfig in Roblox Studio">
    In Roblox Studio, open your experience and navigate to **ServerStorage**. Locate the `TraceConfig` module.
  </Step>

  <Step title="Set the WebhookURL field">
    Find the `WebhookURL` field in `TraceConfig` and paste your webhook URL as a string value:

    ```lua TraceConfig theme={null}
    WebhookURL = "https://discord.com/api/webhooks/YOUR_WEBHOOK_URL_HERE"
    ```

    Replace `YOUR_WEBHOOK_URL_HERE` with the full URL you copied from Discord. Save the file in Studio and publish your place.
  </Step>
</Steps>

<Tip>
  Send a test post to your webhook directly from Discord's **Edit Webhook → Send Test** button before publishing. That confirms the URL is valid and the channel is correct without needing a live Roblox server.
</Tip>

## Filtering Events

Event filtering is configured in the `IntegrationEvents` table inside `TraceConfig`. Set a value to `false` to process the event internally without forwarding it to Discord:

```lua TraceConfig theme={null}
IntegrationEvents = {
    Ban = true,
    Detection = true,
    ModeratorCall = true,
    PlayerReport = true,
    CriticalAlert = true,
    StaffAction = false, -- routine staff actions stay out of Discord
}
```

This keeps your Discord channel focused - for example, receiving only bans and detections while suppressing routine warnings.

## Privacy and Data Handling

<Note>
  All user-entered text - such as moderator-written ban reasons and warning notes - is filtered on the server before being delivered to your webhook. This filter removes content that could expose personally identifiable information or violate platform policies. The content your Discord channel receives reflects the filtered output, not the raw input.
</Note>
