lib.rs
This commit is contained in:
parent
2adceffd59
commit
66e82de28f
3 changed files with 20 additions and 7 deletions
|
@ -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"
|
||||
casual_logger = "0.6.5"
|
||||
|
||||
|
||||
[lib]
|
||||
name = "botLib"
|
||||
path = "src/lib.rs"
|
3
src/lib.rs
Normal file
3
src/lib.rs
Normal file
|
@ -0,0 +1,3 @@
|
|||
|
||||
pub mod core;
|
||||
pub mod modules;
|
17
src/main.rs
17
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);
|
||||
|
|
Loading…
Reference in a new issue