Add config-driven meta module loading and introduce ReactionRegister - #61
Open
WolfDakuraito wants to merge 6 commits into
Open
Add config-driven meta module loading and introduce ReactionRegister#61WolfDakuraito wants to merge 6 commits into
WolfDakuraito wants to merge 6 commits into
Conversation
- add a standalone ReactionRegister module for Discord-based slot subscriptions - store module configuration and managed message metadata in per-UniqueID JSON files - generate subscription messages with reaction bindings for Archipelago slots - support both direct user subscriptions and role-backed subscriptions for group games - add guided setup flow through $setupreactionregister - update managed messages dynamically when reactions are added or removed - validate setup input for missing replies, missing channel mentions, and inaccessible channels - improve resilience around Discord message fetch/edit/delete operations - harden raw reaction handlers against missing guilds, members, and roles - add module-level error logging via the core error log hook
- add ReactionRegister as a configurable optional module - rename FlavorDeathlink to DeathlinkFlavor to match module-based loading (see Bridgeipelago.py changes)
- generalize LoadMetaModules() to load optional modules from MetaConfig - replace the previous hardcoded DeathlinkFlavor import path with dynamic module loading - call module setup() hooks when present so modules can attach their own bot behavior - expose module contents to the runtime so optional modules can integrate with existing core behavior - enable Discord member intent required by reaction-based subscription modules - keep module loading controlled through configuration flags
update DeathlinkFlavor for the new dynamic meta-module loading
- make individual reaction subscriptions also register users in RegistrationData - mirror $register / $clearreg behavior through the reaction system - leave role-based subscriptions untouched
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR reworks how optional meta modules are loaded and adds a new one:
ReactionRegister.The goal here is to make optional modules easier to add without hardcoding each one directly in
bridgeipelago.py.Core changes
LoadMetaModules()to load enabled modules fromMetaConfigsetup()hooksNew module:
ReactionRegister$setupreactionregistersetup flowUniqueIDRegistrationDatasystem$register/$clearregDeathlinkFlavorDeathlinkFlavorso it works with the new dynamic module loading flowConfig changes
updated
config.json.templateadded
ReactionRegistertoMetaConfigaligned meta module naming with the new loader behavior by renaming
FlavorDeathlinktoDeathlinkFlavorWhy
The old meta module setup was still mostly hardcoded.
This change makes the system more reusable and gives me a cleaner base for adding future optional modules.
Testing
Confirmed working:
DeathlinkFlavorloadingReactionRegistersetup flowRegistrationDatasync for individual subscriptionsNotes
This is built around the pre-3.0 modular direction, so some naming was adjusted to fit config-driven loading more cleanly.
I may add another module later that complements
ReactionRegister. I originally planned for this to pair with hint notifications in the main Discord channel, but I wanted to get the base system and this module in first.