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();
// Configure persistent options
let config = Settings { channels: vec![] };
let config_manager = Arc::new(Mutex::new(SettingsManager::manage("settings.json", config)));
config_manager.lock().await.update();
let config_manager: Arc<Mutex<SettingsManager<Settings>>> = Arc::new(Mutex::new(
SettingsManager::load("settings.json").expect("Unable to load config!"),
));
// Set up framework
let framework = poise::Framework::builder()

View File

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