This commit is contained in:
ModulatingForce 2024-02-24 22:31:12 -05:00
parent 2adceffd59
commit 66e82de28f
3 changed files with 20 additions and 7 deletions

View file

@ -12,4 +12,9 @@ twitch-irc = "5.0.1"
rand = { version = "0.8.5", features = [] } rand = { version = "0.8.5", features = [] }
futures = "0.3" futures = "0.3"
async-trait = "0.1.77" async-trait = "0.1.77"
casual_logger = "0.6.5" casual_logger = "0.6.5"
[lib]
name = "botLib"
path = "src/lib.rs"

3
src/lib.rs Normal file
View file

@ -0,0 +1,3 @@
pub mod core;
pub mod modules;

View file

@ -1,12 +1,17 @@
pub mod core; // pub mod core;
pub mod modules; // pub mod modules;
//use myLib;
//pub mod lib;
use std::process::Output; use std::process::Output;
use crate::core::botinstance::ArcBox; // use crate::core::botinstance::ArcBox;
use botLib::core::botinstance::ArcBox;
use botLib::core::botinstance::{self,BotInstance};
// use core::botinstance::{self,BotInstance};
use crate::core::botinstance::{self,BotInstance};
use casual_logger::Extension; use casual_logger::Extension;
use tokio::sync::RwLock; use tokio::sync::RwLock;
use std::sync::Arc; use std::sync::Arc;
@ -32,12 +37,12 @@ pub async fn main() {
for (_,acts) in &*a { for (_,acts) in &*a {
for act in acts { for act in acts {
match act { match act {
crate::core::botmodules::BotAction::C(b) => { botLib::core::botmodules::BotAction::C(b) => {
// println!("bot actiions: {}",b.command) // println!("bot actiions: {}",b.command)
// Log::info(&format!("bot actions: {}",b.command)); // Log::info(&format!("bot actions: {}",b.command));
botinstance::botlog::info(&format!("bot actions: {}",b.command), Some("main()".to_string()), None); botinstance::botlog::info(&format!("bot actions: {}",b.command), Some("main()".to_string()), None);
}, },
crate::core::botmodules::BotAction::L(l) => { botLib::core::botmodules::BotAction::L(l) => {
// println!("bot actiions: {}",l.name) // println!("bot actiions: {}",l.name)
// Log::info(&format!("bot actions: {}",l.name)); // Log::info(&format!("bot actions: {}",l.name));
botinstance::botlog::info(&format!("bot actions: {}",l.name), Some("main()".to_string()), None); botinstance::botlog::info(&format!("bot actions: {}",l.name), Some("main()".to_string()), None);