# $editIn[] — Delayed Message Editing

`$editIn[]` schedules the editing of the message sent by the command after a given delay, replacing its text with the given content. It does not wait: the edit is applied once the response has been sent.

## Syntax

```
$editIn[duration;content]
```

## Parameters

| Parameter | Required | Description |
|-----------|-------------|-------------|
| `duration` | Yes | Delay before editing. Positive, at most 40 minutes. A plain number is read as seconds; units such as `s`, `m`, `h` are accepted (e.g. `3s`, `1m`). |
| `content` | Yes | New text of the message. Must not be empty ("Edited message must not be empty."). |

Exactly 2 arguments are required; there is no message ID parameter.

## Duration Format

| Format | Unit | Example |
|--------|-------|---------|
| `X` | Seconds (plain number, decimals allowed) | `5`, `2.5` |
| `Xms` | Milliseconds | `500ms` |
| `Xs` | Seconds | `5s`, `30s` |
| `Xm` | Minutes | `1m`, `10m` |
| `Xh` | Hours | `1h` (rejected if above 40 minutes) |

Longer spellings (`sec`, `minutes`, ...) and units `d`, `w`, `y` are parsed too, and parts can be combined (`1m30s`), but the total must stay within 40 minutes.

## Return value

An empty string. The edit is scheduled and applied to the response message of the command.

## Examples

### Loading indicator

```bdfd
⏳ Processing...
$editIn[3s;✅ Processing complete!]
```

### Starting message

```bdfd
Starting in 5 seconds...
$editIn[5s;🚀 Let's go!]
```

## Notes

- The maximum duration is 40 minutes; a zero, negative or unparsable duration raises "Duration must be positive and at most 40 minutes.".
- The edit targets the command's main response (text, embeds and components built by the command). Messages sent with `$sendMessage[]` are separate messages and are not edited. If the command has no main response, nothing is edited.
- The edit targets the message sent as the command's response (the engine requires a scheduled-message output, otherwise "No scheduled message output configured.").
- To edit only the embed, use `$editEmbedIn[]`.
- A Components V2 message carries neither text nor embed: the call fails with `This message uses Components V2: edit it with $editMessageCV2.` For a delayed edit of a V2 layout, use `$editInCV2`.
