uberbot/src/config.rs

33 lines
673 B
Rust
Raw Normal View History

2022-07-15 10:58:45 -05:00
use serde::Deserialize;
#[derive(Deserialize)]
pub struct UberConfig {
pub irc: IrcConfig,
2022-07-16 17:05:21 -05:00
pub spotify: Option<SpotifyConfig>,
pub bot: BotConfig
2022-07-15 10:58:45 -05:00
}
#[derive(Deserialize)]
pub struct SpotifyConfig {
2022-07-16 17:05:21 -05:00
pub client_id: String,
pub client_secret: String,
2022-07-15 10:58:45 -05:00
}
#[derive(Deserialize)]
pub struct IrcConfig {
pub channels: Vec<String>,
pub host: String,
pub tls: bool,
pub mode: Option<String>,
pub nickname: Option<String>,
pub port: u16,
pub username: String,
pub prefix: String,
}
#[derive(Deserialize)]
pub struct BotConfig {
pub db_path: Option<String>,
pub history_depth: usize,
pub search_limit: Option<usize>
}