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

# Cases

> Cases unify Headless moderation actions in a per-server history. Use a case ID to inspect details, add follow-up notes, or correct its reason.

## Review and filter

`.cases [member]` (aliases `.cl` and `.caselist`) lists cases for this server and can filter by member; `/cases [member]` offers the same filter. Both lists use pages of ten and are public in the channel. Their buttons are available to the person who opened the list or someone with native `Moderate Members`. If the prefix filter cannot resolve a member, the current runtime may leave the list unfiltered, so verify the results before proceeding. `.case <id>` or `/case case_id:<id>` opens a record. Commands require `Moderate Members` (native or through compatible Fake Permissions).

A case can include its action, target, moderator, reason, date, source, optional duration, metadata, and notes. The case view shows up to the two latest notes; notes do not have their own timestamp.

### `.cases`

```headless-command Syntax theme={null}
.cases [user_query]
```

```headless-command Example theme={null}
.cases
```

Also works: `.cases @member`

### `/cases`

```headless-command Syntax theme={null}
/cases [member:<member>]
```

```headless-command Example theme={null}
/cases member:@member
```

### `.case`

```headless-command Syntax theme={null}
.case <case_id>
```

```headless-command Example theme={null}
.case 42
```

### `/case`

```headless-command Syntax theme={null}
/case case_id:<case_id>
```

```headless-command Example theme={null}
/case case_id:42
```

## Notes and edits

`.casenote <id> <text>` appends a note; `.caseedit <id> <reason>` updates the reason. Both are prefix-only and save to the existing record, so verify the ID first. Notes retain the moderator's name but do not have their own timestamp.

### `.casenote`

```headless-command Syntax theme={null}
.casenote <case_id> <note>
```

```headless-command Example theme={null}
.casenote 42 appeal reviewed
```

### `.caseedit`

```headless-command Syntax theme={null}
.caseedit <case_id> <new_reason>
```

```headless-command Example theme={null}
.caseedit 42 Appeal accepted
```

## Audit Log import

`.caseimport [limit]` (aliases `.importcases` and `.auditcases`) imports compatible Audit Log entries. It is prefix-only; there is no slash variant. The caller needs `View Audit Log` and `Moderate Members`, and Headless needs `View Audit Log`. The default limit is 75 and the runtime clamps it to 1–200; duplicates and unsupported actions are skipped. The importer recognizes bans, unbans, kicks, individual or bulk message deletions, role updates/creation/deletion, and channel deletion. The current runtime classifies every `member_update` entry as a timeout, so review imported cases before treating them as proof of a specific sanction.

### `.caseimport`

```headless-command Syntax theme={null}
.caseimport [limit=75]
```

```headless-command Example theme={null}
.caseimport 75
```

> [!WARNING]
>
> Import reads the server Audit Log and creates persistent records, up to 200 entries. Review imported, skipped, and error counts. `.caseedit` does not preserve the prior reason or create a separate audit event; prefer `.casenote` when you need to retain context.

## Correcting records without losing context

`.casenote <id> <note>` is the safer way to add context without replacing the original reason. `.caseedit <id> <new reason>` (alias `.ce`) overwrites the reason in the existing record; the current callback does not add a note, preserve the prior value, or create a separate case/log entry for the edit. Use notes for appeals or corrections, and reserve `caseedit` for deliberate corrections after verifying the ID.

## Steps

**1. Find the case**

Use `.cases` or filter by member to browse longer lists.

**2. Verify ID and target**

Open `.case <id>` before adding a note or changing the reason.

**3. Import only when needed**

Grant `View Audit Log` temporarily if policy allows and review the summary.

## Related pages

* [Warnings](/docs/en/security/warnings.md)
* [Moderation setup](/docs/en/security/moderation.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.