diff --git a/src/custom.rs b/src/custom.rs index 6107797..01fde56 100644 --- a/src/custom.rs +++ b/src/custom.rs @@ -13,6 +13,7 @@ pub use crate::core::botmodules::ModulesManager; // mod experiments; mod experimental; +mod text_mods; // [ ] init() function that accepts bot instance - this is passed to init() on submodules @@ -20,6 +21,7 @@ pub async fn init(mgr: Arc) { // Modules initializer loads modules into the bot // this is achieved by calling submodules that also have fn init() defined - // experiments::init(mgr).await - experimental::init(mgr).await; -} + experimental::init(mgr.clone()).await; + text_mods::init(Arc::clone(&mgr)).await; + +} \ No newline at end of file diff --git a/src/custom/text_mods.rs b/src/custom/text_mods.rs index 50ff131..97d060c 100644 --- a/src/custom/text_mods.rs +++ b/src/custom/text_mods.rs @@ -3,12 +3,12 @@ use std::sync::Arc; use crate::core::{bot_actions::*, botlog}; use crate::core::botmodules::{BotActionTrait, BotCommand, BotModule, Listener, ModulesManager}; use crate::core::identity::UserRole::*; -use rand::{thread_rng, Rng}; +//use rand::{thread_rng, Rng}; use tokio::time::{sleep, Duration}; -pub async fn init(mgr: &Arc) { +pub async fn init(mgr: Arc) { // Example Working BotCommand Add BotCommand {