# Logs

The resource has logs out of the box, that means that only touching a few lines of config you can have your logs working integrated into Discord via webhook.

## Logs config

To enable the logs you should modify the config inside `configs/sv_config.lua`.

```lua
SV_CONFIG.Logs = {
    enabled = true,
    webhook = '',
    actions = {
        alert = 'The user sent the following alert: **__%s__**',
        unit_changed = 'The user changed their unit to **__%s__**',
        unit_user_changed = 'The user changed the unit of id **__%s__** to **__%s__**',
        subscribe_alert = 'The user subscribed to the following alert: **__%s__**',
        unsubscribe_alert = 'The user unsubscribed from the following alert: **__%s__**',
        add_paint = 'The user added a paint',
        remove_paint = 'The user removed a paint',
    }
}
```

Here you can modify the text of each log, include your config url and toggle the logs option.

The webhook url should look like something like this: `https://discord.com/api/webhooks/1112423049921298522/QKbI6kF6GKfxeOHnc1NUoR64RaQ2t8RuYUHUvyQb3YE2F0qgPjsH46SK5Kv3RTwDepp`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.rcore.cz/paid-resources/rcore_dispatch/logs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
