> For the complete documentation index, see [llms.txt](https://docs.lenoscripts.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lenoscripts.com/scripts/lenoreports/configuration.md).

# Configuration

Editable config.lua for LenoReports.

Use [Customization](/scripts/lenoreports/customization.md) for instructions on categories, language files, theme changes, and editable bridges. See the [User Guide](/scripts/lenoreports/user-guide.md) for duty and ticket workflows.

The configuration below is a reference to the supplied defaults. See the customization page for current limitations affecting translations, category labels, and some notification options.

```lua
--[[
    set leno:discord_webhook "https://discord.com/api/webhooks/..."
    set leno:discord_images_webhook "https://discord.com/api/webhooks/..."
    add_ace group.admin reports.admin allow
]]

Config = {}

-- 'auto' | 'esx' | 'qbcore'
Config.Framework = 'auto'

-- 'auto' | 'ox_inventory' | 'qb-inventory' | 'qs-inventory' | 'codem-inventory'
-- | 'tgiann-inventory' | 'core_inventory' | 'one_inventory' | 'hex_4_inventory' | 'custom'
Config.Inventory = 'auto'

-- 'default' | 'ox_lib' | 'okokNotify' | 'qb' | 'esx' | 'custom'
Config.Notify = 'default'

-- Locale file in locales/{locale}.json
Config.Locale = 'en'

-- Add to server.cfg:
-- add_ace group.admin reports.admin allow
-- add_principal identifier.license:YOUR_LICENSE group.admin
Config.Permissions = {
    admin = 'reports.admin',
}

Config.Debug = {
    enabled = false,
    verboseSql = false,
}

-- Per-player report limits (by author_id / citizenid).
Config.Reports = {
    cooldownSeconds = 60,
    maxActivePerPlayer = 3,
    minDescriptionLength = 10,
    maxDescriptionLength = 500,
    maxSubjectLength = 30,
}

-- Report categories shown in UI. DB stores `key` only. Colors must be hex (#rrggbb).
Config.Categories = {
    { key = 'player_report', label = 'Player Report', color = '#c4b5fd' },
    { key = 'bug_report', label = 'Bug Report', color = '#fdba74' },
    { key = 'other', label = 'Other', color = '#a1a1a1' },
}

-- Discord webhooks: server.cfg only (never put URLs here).
--   set leno:discord_webhook "https://discord.com/api/webhooks/..."        -- action logs
--   set leno:discord_images_webhook "https://discord.com/api/webhooks/..." -- screenshots
Config.Discord = {
    enabled = true,
    botName = 'Leno Reports',
    avatarUrl = '',
    mentionRoleId = '',
    colors = {
        created = 65280,
        claimed = 16127,
        unclaimed = 16776960,
        closed = 16711680,
        goto = 3447003,
        bring = 10181046,
        freeze = 16753920,
        unfreeze = 9807270,
    },
    events = {
        created = true,
        claimed = true,
        unclaimed = false,
        closed = true,
        playerMessage = false,
        staffMessage = false,
        goto = true,
        bring = true,
        freeze = true,
        unfreeze = true,
    },
}

Config.Screenshots = {
    enabled = true,
    showPlayerIds = true,
    playerIdDistance = 50.0,
    includeSelf = true,
    quality = 0.85,
    encoding = 'jpg',
    cooldownMs = 8000,
    maxPerReport = 0, -- 0 or -1 = unlimited
}

Config.Nearby = {
    radius = 50.0,
    maxPlayers = 10,
}

Config.UI = {
    playerCommand = 'report',
    staffCommand = 'reports',
    playerKey = 'F6',
    staffKey = 'F7',
    playerKeyDescription = 'Open player report menu',
    staffKeyDescription = 'Open staff reports menu',
}

Config.StaffNotify = {
    enabled = true,
    onlyOnDuty = true,
    notifyOnNewReport = true,
    notifyOnPlayerReply = true,
    notifyOnClaim = false,
    notifyOnUnclaim = true,
    durationMs = 8500,
    openKey = 'G',
}

Config.StaffChat = {
    historyLimit = 100,
    defaultOnDuty = false,
    persistDuty = true,
}

-- Staff ticket actions (goto / bring / freeze).
-- Anti-cheat: whitelist `leno_reports` in your AC panel; teleports are server-validated only.
-- See plan docs for ElectronAC / WaveShield / FiveGuard notes.
Config.Actions = {
    goto = true,
    bring = true,
    freeze = true,
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.lenoscripts.com/scripts/lenoreports/configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
