The mod cog is becoming huge and covers too many functionalities.
It contains features that do not belong there and, worse, core functions that shouldn't be possible to deactivate.
It its current state it contains:
And I'm probably forgetting something.
This isn't good, the user should be free to disable the mod cog without losing core functionalities. At the moment, disabling mod.py means losing the admin / mod role checks that all cogs use.
This also limits customizability. If you want auto command deletion it means that you're also getting everything else.
Let's start with moving some functions out. The first ones to go are the ones listed above that do not belong in mod.py at all.
Moving the modlog to its own cog might be preferable too, although not strictly necessary, as I expect most people who use it also use our moderation commands.
Thoughts? Design suggestions?
[p]setIf modlog is to be moved to its own cog, then mod needs to make sure it's loaded. Also I'll have to update my PR accordingly
I'd say the settings, the mod/admin role setting commands, and the global blacklist/whitelist should be moved out of mod (probably to owner)
@palmtree5 That's the plan, already in the PR
Got it. On the other stuff, I'm not sure the logging features necessarily belong in mod. I'd say filters/spam prevention stuff could stay where it is though
Thinking about the idea of separating modlog. On loading mod (or any other cog that would use the modlog), we'd need to ensure the modlog cog is loaded or else fail to load and tell the user why. And if someone tries to unload the modlog, we need to handle unloading any cogs that depend on it as well (which means probably maintaining a manual registry of what cogs depend on it as a settings file for modlog)
I'm thinking server/channel ignore/unignore could also be moved elsewhere
Ok, so despite my PR (#709) moving ignore and unignore to Owner, maybe it's time to consider throwing in another default cog that is always loaded and cannot be unloaded unless it's a reload (core.py). This would contain things that should be available all the time but that perhaps don't fit in the theme of owner (for example: ignore and unignore). Maybe there's other commands that could go in this hypothetical new cog too
Another candidate for core.py: Cog-Creators/Cog-Board/issues/25
Since it's likely the checks would be done in red.py
Actually, maybe the per-server modrole/adminrole/prefix settings could also be moved there as well
If cogs ever become per-server, the server-specific commands for turning cogs on and off could probably go in core.py as well
@palmtree5 @Twentysix26 do we need this anymore?
I don't have plans for further debloating
I've been splitting things between files in the rewrite (though they're still in cogs/mod) and then loading each using bot.add_cog in the package's __init__.py
Okay so the decisions have been made and this issue can be closed?
馃憣
Most helpful comment
I'd say the settings, the mod/admin role setting commands, and the global blacklist/whitelist should be moved out of mod (probably to owner)