From e587a6f24a885be09524497bebb85e5390f48a38 Mon Sep 17 00:00:00 2001 From: ModulatingForce <116608425+modulatingforce@users.noreply.github.com> Date: Fri, 22 Dec 2023 09:52:01 -0500 Subject: [PATCH] clarified functionality comments --- src/core/botmodules.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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" })]} } } */