> For the complete documentation index, see [llms.txt](https://fb-scripts.gitbook.io/fb-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fb-scripts.gitbook.io/fb-scripts/scripts/fb-chat/discord-logging.md).

# Discord Logging

Send moderation events (mute, warn, delete, announce, report) directly to a Discord channel.

{% stepper %}
{% step %}
Create a webhook in your Discord server channel settings
{% endstep %}

{% step %}
Open `editable/keys.lua` and paste your webhook URL:

```lua
Keys.Webhook = 'https://discord.com/api/webhooks/YOUR_ID/YOUR_TOKEN'
```

{% endstep %}

{% step %}
**3.** Enable and configure in `config.lua`:

```lua
Config.Webhook = {
    enabled  = true,
    bot_name = 'FB-Chat Moderation',
    color    = 3066993,
    events   = {
        mute = true, 
        unmute = true, 
        warn = true,
        delete = true, 
        announce = true, 
        report = true,
    }
}
```

{% endstep %}
{% endstepper %}
