2024.02.12 - GetRole() Works
This commit is contained in:
parent
2a7b53ddf8
commit
cc11479bf2
4 changed files with 91 additions and 25 deletions
src
19
src/main.rs
19
src/main.rs
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue