Fixed ugly config init

This commit is contained in:
shibedrill 2024-04-22 16:59:07 -04:00
parent 054ab7f437
commit 5f69e460cd
2 changed files with 3 additions and 5 deletions

View File

@ -43,9 +43,9 @@ async fn main() {
pretty_env_logger::init(); pretty_env_logger::init();
// Configure persistent options // Configure persistent options
let config = Settings { channels: vec![] }; let config_manager: Arc<Mutex<SettingsManager<Settings>>> = Arc::new(Mutex::new(
let config_manager = Arc::new(Mutex::new(SettingsManager::manage("settings.json", config))); SettingsManager::load("settings.json").expect("Unable to load config!"),
config_manager.lock().await.update(); ));
// Set up framework // Set up framework
let framework = poise::Framework::builder() let framework = poise::Framework::builder()

View File

@ -1,5 +1,3 @@
#![allow(dead_code)]
use std::io::{Read, Write}; use std::io::{Read, Write};
use std::ops::{Deref, DerefMut}; use std::ops::{Deref, DerefMut};