Fixed Custom giving error
This commit is contained in:
parent
2315270388
commit
b561d24c65
2 changed files with 7 additions and 5 deletions
|
@ -13,6 +13,7 @@ pub use crate::core::botmodules::ModulesManager;
|
||||||
|
|
||||||
// mod experiments;
|
// mod experiments;
|
||||||
mod experimental;
|
mod experimental;
|
||||||
|
mod text_mods;
|
||||||
|
|
||||||
// [ ] init() function that accepts bot instance - this is passed to init() on submodules
|
// [ ] init() function that accepts bot instance - this is passed to init() on submodules
|
||||||
|
|
||||||
|
@ -20,6 +21,7 @@ pub async fn init(mgr: Arc<ModulesManager>) {
|
||||||
// Modules initializer loads modules into the bot
|
// Modules initializer loads modules into the bot
|
||||||
// this is achieved by calling submodules that also have fn init() defined
|
// this is achieved by calling submodules that also have fn init() defined
|
||||||
|
|
||||||
// experiments::init(mgr).await
|
experimental::init(mgr.clone()).await;
|
||||||
experimental::init(mgr).await;
|
text_mods::init(Arc::clone(&mgr)).await;
|
||||||
}
|
|
||||||
|
}
|
|
@ -3,12 +3,12 @@ use std::sync::Arc;
|
||||||
use crate::core::{bot_actions::*, botlog};
|
use crate::core::{bot_actions::*, botlog};
|
||||||
use crate::core::botmodules::{BotActionTrait, BotCommand, BotModule, Listener, ModulesManager};
|
use crate::core::botmodules::{BotActionTrait, BotCommand, BotModule, Listener, ModulesManager};
|
||||||
use crate::core::identity::UserRole::*;
|
use crate::core::identity::UserRole::*;
|
||||||
use rand::{thread_rng, Rng};
|
//use rand::{thread_rng, Rng};
|
||||||
use tokio::time::{sleep, Duration};
|
use tokio::time::{sleep, Duration};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
pub async fn init(mgr: &Arc<ModulesManager>) {
|
pub async fn init(mgr: Arc<ModulesManager>) {
|
||||||
|
|
||||||
// Example Working BotCommand Add
|
// Example Working BotCommand Add
|
||||||
BotCommand {
|
BotCommand {
|
||||||
|
|
Loading…
Reference in a new issue