# Struct Config

> The bot's configuration: the keys its manifest declares in `config`, each with the value the owner set or else its default. Keys with neither are absent. Given to `Bot::on_start` a

`zaun_bot::Config` · Struct

```rust
pub struct Config(…)
```

The bot's configuration: the keys its manifest declares in `[config]`, each with the
value the owner set or else its default. Keys with neither are absent. Given to
`Bot::on_start` and `Bot::commands` at start and to `Bot::on_config` on a change.

## Methods

### `get`

```rust
pub fn get(&self, key: &str) -> Option<&str>
```

The value of `key`, if set (by the owner, or the manifest's default).

### `get_or`

```rust
pub fn get_or<'a>(&self, key: &str, default: &'a str) -> &'a str
```

The value of `key`, or `default` when it is not set.

## Trait implementations

`Clone`, `Debug`, `Default`, `Eq`, `PartialEq`, `StructuralPartialEq`

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