smol add awaits

This commit is contained in:
ModulatingForce 2024-02-12 06:18:57 -05:00
parent 372893af15
commit 760461a9b4
3 changed files with 7 additions and 6 deletions

View file

@ -341,7 +341,7 @@ impl ModulesManager
// crate::modules::init(&mut mgr); // crate::modules::init(&mut mgr);
// let a = a.clone(); // let a = a.clone();
// crate::modules::init(a.clone()); // crate::modules::init(a.clone());
crate::modules::init(Arc::clone(&mgra)); crate::modules::init(Arc::clone(&mgra)).await;
@ -536,6 +536,7 @@ impl ModulesManager
modactions.push(in_action); modactions.push(in_action);
println!(">> Modules Manager : Called Add bot Action"); println!(">> Modules Manager : Called Add bot Action");
println!("add_botaction - botactions size : {}",modactions.len());
//println!(">> Modules Manager : {:?}",&self); //println!(">> Modules Manager : {:?}",&self);
//(); //();

View file

@ -27,12 +27,12 @@ mod experiments;
// // F : Send, // // F : Send,
// F : Send + ?Sized, // F : Send + ?Sized,
// pub fn init(mgr:&mut ModulesManager) // pub fn init(mgr:&mut ModulesManager)
pub fn init(mgr:Arc<ModulesManager>) pub async fn init(mgr:Arc<ModulesManager>)
{ {
// Modules initializer loads modules into the bot // Modules initializer loads modules into the bot
// this is achieved by calling submodules that also have fn init() defined // this is achieved by calling submodules that also have fn init() defined
experiments::init(mgr) experiments::init(mgr).await
//(); //();
} }

View file

@ -32,7 +32,7 @@ use std::sync::{Arc, RwLock};
// pub fn init(mgr:&mut ModulesManager) // pub fn init(mgr:&mut ModulesManager)
pub fn init(mgr:Arc<ModulesManager>) pub async fn init(mgr:Arc<ModulesManager>)
{ {
@ -60,7 +60,7 @@ pub fn init(mgr:Arc<ModulesManager>)
], ],
}; };
botc1.add_to_modmgr(Arc::clone(&mgr)); botc1.add_to_modmgr(Arc::clone(&mgr)).await;
@ -71,7 +71,7 @@ pub fn init(mgr:Arc<ModulesManager>)
help : String::from("") help : String::from("")
}; };
list1.add_to_modmgr(Arc::clone(&mgr)); list1.add_to_modmgr(Arc::clone(&mgr)).await;
} }