# Struct prelude::Message

> Struct Message in zaun_bot.

`zaun_bot::prelude::Message` · Struct

```rust
pub struct Message { … }
```

## Fields

### `message_id: Id`

### `channel_id: Id`

### `sequence: u64`

### `author_id: Id`

### `created_at: Timestamp`

### `edited_at: Option<Timestamp>`

### `content: String`

Empty when the bot lacks `message_content` (unless it is mentioned).

### `embeds: Vec<Embed>`

### `components: Vec<Component>`

### `flags: u32`

Raw flag bits.

### `reply_to: Option<Id>`

### `mentions: Mentions`

### `attachments: Vec<Attachment>`

### `interaction: Option<InteractionMetadata>`

## Methods

### `reply`

```rust
pub fn reply<impl Into<Reply>>(&self, reply: impl Into<Reply>) -> Result<Id, HostError>
```

Replies in the same channel. Returns the reply's id.

# Errors
The host's refusal.

### `edit`

```rust
pub fn edit<impl Into<Reply>>(&self, reply: impl Into<Reply>) -> Result<(), HostError>
```

Edits it (the bot's own messages only).

# Errors
The host's refusal.

### `delete`

```rust
pub fn delete(&self) -> Result<(), HostError>
```

Deletes it (the bot's own, or any with `MANAGE_MESSAGES`).

# Errors
The host's refusal.

### `react`

```rust
pub fn react(&self, emoji: &str) -> Result<(), HostError>
```

Adds a reaction.

# Errors
The host's refusal.

### `unreact`

```rust
pub fn unreact(&self, emoji: &str) -> Result<(), HostError>
```

Removes the bot's own reaction.

# Errors
The host's refusal.

## Trait implementations

`Clone`, `Debug`

[Full rustdoc page](/docs/api/rust/zaun-bot/zaun_bot/bindings/zaun/bot/types/struct.Message.html)
