# Send Advanced Message

> Send a Components v2 message.

- ID: `send_advanced_message`
- Type: Block
- Category: [Messages](https://inventor.bot/docs/reference/blocks/messages.md)

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `channel_id` | yes | ID of channel to send message to. |  |
| `edit_message_id` |  | If you wish to edit a message instead of sending a new message, provide a message ID. |  |
| `reply_to_message_id` |  | If you wish to reply to a message, provide the ID of the message you wish to reply to. This does not work with editing messages. |  |
| `allow_mentions` |  | Choose which mention types should notify users. Empty or None disables all pings. None overrides other selections. Unselected mentions are displayed without pinging. | `"None"`, `"Everyone/Here"`, `"Roles"`, `"Users"` |
| `message_components` | yes | Components of the message sent by the bot. | blocks: `func() { ... }` with only `advmsgcmp_layout_*`, `advmsgcmp_content_*` blocks |

**Outputs**

| Name | Description | Value |
| --- | --- | --- |
| `message_id` | ID of the sent or edited message |  |

**Example**

```go
advancedMessage := send_advanced_message(Args{
	channel_id: trigger.channel_id,
	message_components: func() {
		advmsgcmp_layout_container(Args{accent_color: "#0099ff", spoiler: "true"})
	},
})
send_text_message(Args{
	channel_id:      trigger.channel_id,
	message_content: "Message ID: " + advancedMessage.message_id,
})
```

## Blocks inside

These blocks can only be placed inside this one:

- [Text](https://inventor.bot/docs/reference/blocks/advanced-messages/advmsgcmp-content-text.md) (`advmsgcmp_content_text`), in `message_components`
- [Message Container](https://inventor.bot/docs/reference/blocks/advanced-messages/advmsgcmp-layout-container.md) (`advmsgcmp_layout_container`), in `message_components`
- [Section](https://inventor.bot/docs/reference/blocks/advanced-messages/advmsgcmp-layout-section.md) (`advmsgcmp_layout_section`), in `message_components`
- [Action Row](https://inventor.bot/docs/reference/blocks/advanced-messages/advmsgcmp-layout-actionrow.md) (`advmsgcmp_layout_actionrow`), in `message_components`
- [Separator](https://inventor.bot/docs/reference/blocks/advanced-messages/advmsgcmp-layout-separator.md) (`advmsgcmp_layout_separator`), in `message_components`
- [Gallery](https://inventor.bot/docs/reference/blocks/advanced-messages/advmsgcmp-layout-gallery.md) (`advmsgcmp_layout_gallery`), in `message_components`