clemsbot/src/app/user_config.rs

35 lines
614 B
Rust
Raw Normal View History

2021-08-18 05:45:44 +00:00
use serde::Deserialize;
use twitch_api2::twitch_oauth2::{ClientId, ClientSecret};
2021-08-20 06:49:59 +00:00
use std::net::IpAddr;
2021-08-18 05:45:44 +00:00
#[derive(Deserialize)]
pub struct UserConfig {
pub twitch: Twitch,
pub bot: Bot,
2021-08-20 06:49:59 +00:00
pub web: Web,
2022-03-19 12:04:37 +00:00
pub livesplit: LiveSplit,
2021-08-18 05:45:44 +00:00
}
#[derive(Deserialize)]
pub struct Twitch {
pub client_id: ClientId,
pub client_secret: ClientSecret,
pub channel_id: u64,
}
#[derive(Deserialize)]
pub struct Bot {
pub access_token: String,
}
2021-08-20 06:49:59 +00:00
#[derive(Deserialize)]
pub struct Web {
pub address: IpAddr,
pub port: u16,
}
2022-03-19 12:04:37 +00:00
#[derive(Deserialize)]
pub struct LiveSplit {
pub server: String,
}