# Trait bindings::Guest

> Trait Guest in zaun_bot.

`zaun_bot::bindings::Guest` · Trait

```rust
pub trait Guest { … }
```

## Methods

### `init`

```rust
fn init(config: Vec<(String, String)>) -> Registration;
```

Called once per instance start with the bot's configuration: the keys its manifest
declares in `[config]`, each with the owner's value or else the declared default (keys
with neither are left out). Secret values are passed like any other.

### `on_config_change`

```rust
fn on_config_change(config: Vec<(String, String)>);
```

The owner changed the configuration while the bot runs: every value again, as for
`init`. The instance is not restarted and its commands stay registered.

### `on_event`

```rust
fn on_event(event: Event);
```

A subscribed event.

### `on_interaction`

```rust
fn on_interaction(interaction: Interaction);
```

An application command, component click or modal submit.

### `on_autocomplete`

```rust
fn on_autocomplete(interaction: Interaction) -> Vec<Choice>;
```

Autocomplete: return up to 25 choices for the focused option.

### `on_timer`

```rust
fn on_timer(id: u64, tag: String);
```

A timer fired.

### `on_voice_event`

```rust
fn on_voice_event(event: VoiceEvent);
```

Something happened in the bot's voice stay or player.

[Full rustdoc page](/docs/api/rust/zaun-bot/zaun_bot/bindings/trait.Guest.html)
