# $messageID

The function `$messageID` returns the **unique identifier** (snowflake) of the message that triggered the execution of the command.

## Syntax

```
$messageID
```

## Parameters

None.

## Return Value

| Type | Description |
|---|---|
| `string` | The value of the `message.id` context variable supplied by the host (the ID of the triggering message), or an empty string if the host supplied none. |

## Examples

### Display the message ID

```bdfd
$sendMessage[Message ID: $messageID]
```

### Direct link to the message

```bdfd
$sendMessage[Link to the message: https://discord.com/channels/$guildID/$channelID/$messageID]
```

### Log the ID

```bdfd
$channelSendMessage[$channelIDFromName[logs];Message $messageID processed by $username.]
```

### Delete the message after processing

```bdfd
$deleteMessage[$channelID;$messageID]
$sendMessage[Message processed and deleted.]
```

## Notes

- Can be used with `$deleteMessage` and `$editMessage`.
- `$messageID` takes no argument.

