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

# Invoke Messages

> Customize what misery says when a moderation command runs.

## Overview

Every punishment command has a default confirmation message. Invoke lets you replace it — both the response posted in the channel and the DM sent to the punished member.

> [!NOTE]
>
> Requires the **Manage Server** permission.

## Setting a command response

This is what misery posts in the channel where the command was run.

```javascript Syntax theme={null}
,invoke (command) (message)
```

```javascript Example theme={null}
,invoke ban {user.name} has been removed by {moderator.name}
```

## Setting a DM response

Add `dm` before the command name to configure what the punished member receives privately.

```javascript Syntax theme={null}
,invoke dm (command) (message)
```

```javascript Example theme={null}
,invoke dm ban you were banned from {guild.name} for: {reason}
```

> [!TIP]
>
> Both accept full embed syntax. Start your script with `{embed}` to build a rich embed instead of plain text — see [Scripting](/resources/scripting).

## Supported commands

**Bans**

`ban` · `hardban` · `softban` · `tempban` · `unban`

**Mutes**

`mute` · `unmute` · `imute` · `iunmute` · `rmute` · `runmute`

**Other**

`kick` · `warn` · `jail` · `unjail` · `timeout` · `untimeout`

> [!WARNING]
>
> `imute`, `iunmute`, `rmute`, and `runmute` don't send DMs, so they only take channel responses.

## Variables

| Variable | Resolves to |
| - | - |
| `{user}` | The punished member |
| `{moderator}` | Whoever ran the command |
| `{reason}` | The reason given |
| `{duration}` | Length of the punishment, or `Permanent` |
| `{guild.name}` | Your server |
| `{channel.mention}` | The channel the command ran in |

Sub-properties like `{user.name}` and `{moderator.mention}` work the same way they do elsewhere — see [Variables](/resources/variables).

## Previewing

Check what's currently configured before it goes live.

```javascript Syntax theme={null}
,invoke preview (command)
```

```javascript Example theme={null}
,invoke preview ban
,invoke preview dm ban
```

## Resetting to default

Pass `default` as the message to clear your custom script.

```javascript theme={null}
,invoke ban default
,invoke dm ban default
```

## Limits

misery checks your script against Fluxer's embed limits before saving, so you get a clear error rather than a silent failure later.

| Element | Max |
| - | - |
| Message content | 2,000 characters |
| Embed title | 256 |
| Embed description | 4,096 |
| Embed author | 256 |
| Embed footer | 2,048 |
| Field name | 256 |
| Field value | 1,024 |
| Fields per embed | 25 |
| Embed total | 6,000 characters |


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