dev into main #15
3 changed files with 7 additions and 6 deletions
|
@ -341,7 +341,7 @@ impl ModulesManager
|
|||
// crate::modules::init(&mut mgr);
|
||||
// let a = 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);
|
||||
|
||||
println!(">> Modules Manager : Called Add bot Action");
|
||||
println!("add_botaction - botactions size : {}",modactions.len());
|
||||
//println!(">> Modules Manager : {:?}",&self);
|
||||
|
||||
//();
|
||||
|
|
|
@ -27,12 +27,12 @@ mod experiments;
|
|||
// // F : Send,
|
||||
// F : Send + ?Sized,
|
||||
// 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
|
||||
// this is achieved by calling submodules that also have fn init() defined
|
||||
|
||||
experiments::init(mgr)
|
||||
experiments::init(mgr).await
|
||||
|
||||
//();
|
||||
}
|
|
@ -32,7 +32,7 @@ use std::sync::{Arc, RwLock};
|
|||
|
||||
|
||||
// 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("")
|
||||
};
|
||||
|
||||
list1.add_to_modmgr(Arc::clone(&mgr));
|
||||
list1.add_to_modmgr(Arc::clone(&mgr)).await;
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue