You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
486 B

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<Command>,
pub secret: String,
lazy_static! {
pub static ref CONFIG: Config = toml::from_str(&read_config()).unwrap();