diff --git a/src/core/botmodules.rs b/src/core/botmodules.rs index b5fd131..9dc1e2a 100644 --- a/src/core/botmodules.rs +++ b/src/core/botmodules.rs @@ -6,11 +6,21 @@ use std::collections::HashMap; /* -ModulesManager is made of modulesdb , a HashMap of BotModules with a Vector representing their enabled/disabled status based on channel and instance +ModulesManager is used to manage Modules and BotActions associated with those modules + +pub struct ModulesManager { + statusdb: HashMap>, + botactions: HashMap>, +} + +- statusdb: HashMap> - Defines Modules and their ModStatusType (e.g., Enabled at an Instance level, Disabled at a Channel Level) +- botactions: HashMap> - Defines Modules and their BotActions (e.g., BotCommand , Listener, Routine) Example { - BotModule("Experiments") , [Enabled(Channel("modulatingforce")) , Disabled(Channel("modulatingforce")), Enabled(Instance)] + ModulesManager { + statusdb: {BotModule("experiments 004"): [Enabled(Instance)]}, + botactions: {BotModule("experiments 004"): [C(BotCommand { module: BotModule("experiments 004"), command: "DUPCMD4", alias: ["DUPALIAS4A", "DUPALIAS4B"], help: "DUPCMD4 tester" })]} } } */