> For the complete documentation index, see [llms.txt](https://mango-5m.gitbook.io/mango5m-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mango-5m.gitbook.io/mango5m-docs/resources/mango-achievements/configuration/discord-logging.md).

# Discord Logging

Optional webhooks for unlocks and admin actions.

Off by default. Point it at a webhook to log unlocks and every admin action.

```lua
Config.Webhooks = {
    enabled   = true,
    username  = 'Mango Achievements',
    unlocks   = 'YOUR_WEBHOOK_HERE',
    admin     = 'YOUR_WEBHOOK_HERE',
    minRarity = 'rare',
    includeIdentifier = true,
}
```

| Setting             | Does                                                       |
| ------------------- | ---------------------------------------------------------- |
| `unlocks`           | Player milestones. Either URL can be left empty on its own |
| `admin`             | An audit trail of every `/achievement*` command            |
| `minRarity`         | Only log unlocks this rare or rarer. `nil` logs everything |
| `includeIdentifier` | Include the player's identifier in admin logs              |

Unlock embeds are coloured to match the award's rarity, so the channel reads at a glance.

{% hint style="info" %}
Posts go through a queue with a fixed gap between sends. Discord rate-limits webhooks per channel, so a server-wide event unlocking the same award for forty people at once would otherwise lose most of them.
{% endhint %}

{% hint style="warning" %}
Set `includeIdentifier = false` if you treat licence identifiers as personal data in your logging channel.
{% endhint %}
