# Struct presence::Activity

> What the bot is doing: build one with `Activity::playing`, `Activity::listening`, …

`zaun_bot::presence::Activity` · Struct

```rust
pub struct Activity(…)
```

What the bot is doing: build one with `Activity::playing`, `Activity::listening`, …

## Methods

### `playing`

```rust
pub fn playing<impl Into<String>>(name: impl Into<String>) -> Self
```

"Playing {name}".

### `streaming`

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

"Streaming {name}", with an `https://` link members may open (after confirming).

### `listening`

```rust
pub fn listening<impl Into<String>>(name: impl Into<String>) -> Self
```

"Listening to {name}".

### `watching`

```rust
pub fn watching<impl Into<String>>(name: impl Into<String>) -> Self
```

"Watching {name}".

### `competing`

```rust
pub fn competing<impl Into<String>>(name: impl Into<String>) -> Self
```

"Competing in {name}".

### `custom`

```rust
pub fn custom<impl Into<String>>(text: impl Into<String>) -> Self
```

Free text, with an optional emoji (`Activity::emoji`).

### `details`

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

A second line, e.g. the track (≤ 128 characters).

### `state`

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

A third line, e.g. the artist (≤ 128 characters).

### `started_at`

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

When it started, ms since the epoch (clients show the elapsed time).

### `emoji`

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

A Unicode emoji, for `Activity::custom` only.

## Trait implementations

`Clone`, `Debug`

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