# Struct PartialMessage

> A message known only by its id, as an edit, a deletion or a reaction names it: the client keeps no message history, so its text and author are not at hand. It acts like a `Message`

`zaun_client::PartialMessage` · Struct

```rust
pub struct PartialMessage { … }
```

A message known only by its id, as an edit, a deletion or a reaction names it: the client
keeps no message history, so its text and author are not at hand. It acts like a
`Message`.

## Methods

### `id`

```rust
pub const fn id(&self) -> MessageId
```

Its id.

### `channel`

```rust
pub const fn channel(&self) -> &Channel
```

Its channel.

### `community`

```rust
pub const fn community(&self) -> &Community
```

Its community.

### `reply`

```rust
pub fn reply<impl Into<MessageOptions>>(&self, options: impl Into<MessageOptions>) -> Result<Message>
```

Answers this message in its channel: text, or `MessageOptions`.

# Errors
As `Channel::send`.

### `edit`

```rust
pub fn edit<impl Into<EditMessage>>(&self, options: impl Into<EditMessage>) -> Result<()>
```

Edits this message (one of this member's): new text, or an `EditMessage` with its
text and new embeds (whose pictures must be attachments the message already has) or
mentions.

# Errors
No text given ([`Error::Protocol`]: a partial message does not know its own, and the
protocol replaces it), or as `Message::edit`.

### `delete`

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

Deletes this message (one's own, or any with `MANAGE_MESSAGES`).

# Errors
The host refused or did not answer.

### `react`

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

Adds `emoji` as this member.

# Errors
The host refused or did not answer.

### `unreact`

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

Takes this member's `emoji` off.

# Errors
The host refused or did not answer.

## Trait implementations

`Clone`, `Debug`, `From<&Message>`, `PartialEq`

[Full rustdoc page](/docs/api/rust/zaun-client/zaun_client/objects/struct.PartialMessage.html)
