# 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](https://wiki.staffplusplus.org/general-information/other/configuring-commands)

### 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](https://wiki.staffplusplus.org/features/reporting/custom-report-types) |
| 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" 
```
