2024.02.12 - GetRole() Works

This commit is contained in:
ModulatingForce 2024-02-12 02:34:32 -05:00
commit cc11479bf2
4 changed files with 91 additions and 25 deletions

View file

@ -14,7 +14,24 @@ pub type BotAR = Arc<RwLock<BotInstance>>;
#[tokio::main]
pub async fn main() {
let bot = BotInstance::init();
let bot = BotInstance::init().await;
let a = Arc::clone(&bot.botmodules.botactions);
let a = a.read().await;
// let a = *a;
for (_,acts) in &*a {
for act in acts {
match act {
crate::core::botmodules::BotAction::C(b) => println!("bot actiions: {}",b.command),
crate::core::botmodules::BotAction::L(l) => println!("bot actiions: {}",l.name),
_ => println!("Not a valid match??"),
}
}
};
println!("Starting runner..");
bot.runner().await;