Skip to content

zaun_bot::Config · Struct

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.

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

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

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

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

Clone, Debug, Default, Eq, PartialEq, StructuralPartialEq

Full rustdoc page