# Struct command::object::MessageBody

> Content, embeds, components, attachments, mentions and flags of a bot's message.

`zaun_community_protocol::command::object::MessageBody` · Struct

```rust
pub struct MessageBody { … }
```

Content, embeds, components, attachments, mentions and flags of a bot's message.

## Fields

### `content: Option<String>`

≤ 4 000 scalars.

### `embeds: Option<Vec<Embed>>`

≤ 10 embeds.

### `components: Option<Vec<Component>>`

Components.

### `attachments: Vec<AttachmentId>`

Attachments the bot uploaded to the channel, not yet on a message.

### `mentions: Option<Mentions>`

Who to notify.

### `flags: Option<u32>`

`flags` bits.

## Methods

### `flag_bits`

```rust
pub fn flag_bits(&self) -> u32
```

The flags, 0 when absent.

### `is_ephemeral`

```rust
pub fn is_ephemeral(&self) -> bool
```

Whether `EPHEMERAL` is set.

### `check`

```rust
pub fn check(&self, whole: bool) -> Result<(), BodyError>
```

State-free rules. `whole`: a new message (needs something to show), not an edit.

# Errors
The first violated rule.

## Trait implementations

`Clone`, `Debug`, `Default`, `Deserialize<'de>`, `Eq`, `PartialEq`, `Serialize`, `StructuralPartialEq`

[Full rustdoc page](/docs/api/rust/zaun-community-protocol/zaun_community_protocol/command/object/interaction/body/struct.MessageBody.html)
