diff --git a/Cargo.toml b/Cargo.toml index 3b8edd4..70c9e9c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,4 +12,9 @@ twitch-irc = "5.0.1" rand = { version = "0.8.5", features = [] } futures = "0.3" async-trait = "0.1.77" -casual_logger = "0.6.5" \ No newline at end of file +casual_logger = "0.6.5" + + +[lib] +name = "botLib" +path = "src/lib.rs" \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..15558d2 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,3 @@ + +pub mod core; +pub mod modules; diff --git a/src/main.rs b/src/main.rs index 316483e..afd1526 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,12 +1,17 @@ -pub mod core; -pub mod modules; +// pub mod core; +// pub mod modules; +//use myLib; +//pub mod lib; 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 tokio::sync::RwLock; use std::sync::Arc; @@ -32,12 +37,12 @@ pub async fn main() { for (_,acts) in &*a { for act in acts { match act { - crate::core::botmodules::BotAction::C(b) => { + botLib::core::botmodules::BotAction::C(b) => { // println!("bot actiions: {}",b.command) // Log::info(&format!("bot actions: {}",b.command)); 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) // Log::info(&format!("bot actions: {}",l.name)); botinstance::botlog::info(&format!("bot actions: {}",l.name), Some("main()".to_string()), None);