# Struct Button

> Builds a `types::Button`.

`zaun_bot::Button` · Struct

```rust
pub struct Button(…)
```

Builds a `types::Button`.

## Methods

### `primary`

```rust
pub fn primary<impl Into<String>, impl Into<String>>(custom_id: impl Into<String>, label: impl Into<String>) -> Self
```

A primary (blurple) button.

### `secondary`

```rust
pub fn secondary<impl Into<String>, impl Into<String>>(custom_id: impl Into<String>, label: impl Into<String>) -> Self
```

A secondary (grey) button.

### `success`

```rust
pub fn success<impl Into<String>, impl Into<String>>(custom_id: impl Into<String>, label: impl Into<String>) -> Self
```

A success (green) button.

### `danger`

```rust
pub fn danger<impl Into<String>, impl Into<String>>(custom_id: impl Into<String>, label: impl Into<String>) -> Self
```

A danger (red) button.

### `link`

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

A link button: `https://` only; clients ask before opening it. Sends no interaction.

### `emoji`

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

Adds a Unicode emoji.

### `disabled`

```rust
pub fn disabled(self, disabled: bool) -> Self
```

Greys it out.

### `build`

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

The finished button.

## Trait implementations

`Clone`, `Debug`

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