[Extension Metadata]: small refactor & add load attribute #54
Labels
good first issue
Good for newcomers
help wanted
Extra attention is needed
l: beginner
p: normal
Normal Priority
s: approved
The issue has received a maintainer's approval
t: enhancement
Changes or improvements to existing features
t: feature
Relating to the functionality of the application.
Is there an existing issue for this?
What is the feature?
Overview
While our extension loading system is able to handle multiple different cases, we'd like to add support to the metadata to be able to set files to not load when the bot is loaded, and load them at a later time.
We'd also like to have extensions and plugins which are walked, deemed valid, but not loaded. This allows us to have them in the system, but not have them loaded at the time.
Implementation
The majority of the walking takes place in modmail/utils/extensions.py, but a bit of it also takes place in modmail/utils/plugins.py
Both of these metadata loaders should be refactored to load metadata into a dict, in order to make easier to expand over time. Anywhere that these wailking methods are used will need to be updated to use the dict, and where
EXTENSIONS
orPLUGINS
global variables are used.Would you like to implement this yourself?
No, someone else can implement it
The text was updated successfully, but these errors were encountered: