use super::commands::*; use serde::Deserialize; use std::fs; pub fn read_config() -> String { fs::read_to_string("config.toml").expect("Could not read config file. Make sure a file named config.toml exists in the current working directory.") } #[derive(Deserialize, Debug)] pub struct Config { #[serde(rename = "command")] pub commands: Vec, pub secret: String, } lazy_static! { pub static ref CONFIG: Config = toml::from_str(&read_config()).unwrap(); }