# Command hooks

You can execute commands upon certain lifecycle changes of a report:

```yaml
 investigations-module: 
   accept-commands: []
   reject-commands: []
   reopen-commands: []
   resolve-commands: []
```

Commands listed here should be in the [Staff ++ command format](/general-information/other/configuring-commands.md)

### Placeholders:

| placeholder | description                                                     |
| ----------- | --------------------------------------------------------------- |
| %reporter%  | The name of the player that created the report                  |
| %assigned%  | The name of the staff member assigned to the report, if present |
| %culprit%   | The name of the player that has been reported, if present       |

### Executors:

| executor value | description                         |
| -------------- | ----------------------------------- |
| reporter       | The player that created the report  |
| assigned       | The staff member currently assigned |
| culprit        | The player that has been reported   |

### Targets:

| target value | description                         |
| ------------ | ----------------------------------- |
| reporter     | The player that created the report  |
| assigned     | The staff member currently assigned |
| culprit      | The player that has been reported   |

### Filters

| filter     | possible values                      | description                                                                                                                         |
| ---------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
| type       | comma separated list of the any type | Can specify if a command should be executed only when the report is of a certain [type](/features/reporting/custom-report-types.md) |
| hasculprit | \[true/false]                        | Can specify if a command should be executed only when it's a report that is targeting a player                                      |

### Example:

```yaml
 reports-module: 
    accept-commands: []
   reject-commands: []
   reopen-commands: []
   resolve-commands:
       - command: "tell %assigned% Good job?"
         target: "assigned"
         target-run-strategy: ONLINE
       - command: "tell %culprit% A staff member has resolved a report in which you were the culprit"
         target: culprit
         target-run-strategy: DELAY
         filters: "hasculprit=true;type=HACKING,GRIEFING" 
```


---

# 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://wiki.staffplusplus.org/features/reporting/command-hooks.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.
