# Struct EmbedBuilder

> Builds an `Embed`. Pictures are attachment ids of the same message.

`zaun_bot::EmbedBuilder` · Struct

```rust
pub struct EmbedBuilder(…)
```

Builds an `Embed`. Pictures are attachment ids of the same message.

## Methods

### `new`

```rust
pub fn new() -> Self
```

An empty embed; give it at least a title, description, field, author or footer.

### `title`

```rust
pub fn title<impl Into<String>>(self, t: impl Into<String>) -> Self
```

Title (≤ 256).

### `description`

```rust
pub fn description<impl Into<String>>(self, d: impl Into<String>) -> Self
```

Description (≤ 4 096).

### `url`

```rust
pub fn url<impl Into<String>>(self, url: impl Into<String>) -> Self
```

The title's `https://` link.

### `color`

```rust
pub fn color(self, rgb: u32) -> Self
```

Side colour, `0xRRGGBB`.

### `timestamp`

```rust
pub fn timestamp(self, ms: u64) -> Self
```

Timestamp, ms since the epoch.

### `author`

```rust
pub fn author<impl Into<String>>(self, name: impl Into<String>) -> Self
```

Author line.

### `footer`

```rust
pub fn footer<impl Into<String>>(self, text: impl Into<String>) -> Self
```

Footer text.

### `image`

```rust
pub fn image<impl Into<Id>>(self, attachment: impl Into<Id>) -> Self
```

Large picture: an image attachment of the same message.

### `thumbnail`

```rust
pub fn thumbnail<impl Into<Id>>(self, attachment: impl Into<Id>) -> Self
```

Small picture: an image attachment of the same message.

### `field`

```rust
pub fn field<impl Into<String>, impl Into<String>>(self, name: impl Into<String>, value: impl Into<String>, inline: bool) -> Self
```

A field (≤ 25).

### `build`

```rust
pub fn build(self) -> Embed
```

The finished embed.

## Trait implementations

`Clone`, `Debug`, `Default`, `From<EmbedBuilder>`

[Full rustdoc page](/docs/api/rust/zaun-bot/zaun_bot/embed/struct.EmbedBuilder.html)
