Let's imagine you're writing a large bot, it has many components, like auto-moderator, music, levelling and more.
A end-user likes your bot and adds it to his server, but he doesn't want auto-moderator, but he wants others features.
So, the problem is you can't disable a cog, for a specific server.
The ideal solution is to make a API or a Extension which makes it easy to disable and enable cogs. You can think of a extension that has been written over the commands extension.
This can be done using cog_check, but for simplicity, a good plugin API would be nice to have.
I have made a RoadMap for this API, hope you like it, I'll update once I finish a check in the checklist.
[ ] Make a class which needs to be inherited to make the Plugin work (Name: Plugin)
[ ] Make two extra functions to be overridden in the inherited plugin class when the plugin is enabled and disabled (Args: guild the plugin is disabled or enabled) (Name: on_plugin_disable(self, guild) same for enable as well)
[ ] Make a set to save all Plugins, and raise error if there's two plugins with same name.
[ ] Make a method in bot that loads the plugins and unloads the plugin (those are overridden function of load_extension and unload_extension)
This is what I planned till now. I'll update it once I get an idea or finish this checklist first. I would love to hear your comments.
This is outside of the scope of the library.
There are many ways of doing this and many people have come up with different ways that suit their needs (consider, for example, different database systems and storage methods). There is no room for the library to make these choices since all the things to make this work are already there and ready for consumption. Adding more terminology into the mix won't solve anything and these extra APIs don't seem to buy anything that couldn't be accomplished with the pre-existing checks system.
Would you like to ask other contributors as well?
Would you like to ask other contributors as well?
No. There is no one else to ask.
Would you like to ask other contributors as well?
@sairam4123 This feature request adds a very small specific niche feature that can easily be implemented on your own. Additionally, your roadmap takes very little consideration into how the cogs/commands extension currently works.
Oh ok, then I'll just make extension, myself.
Red-DiscordBot has this
Can we talk about this is in Discord instead?
Sairam#1724
Please lock this to collaborators only @Rapptz