Tags: discord-modmail/modmail
Tags
Merge pull request #43 from discord-modmail/feat/extensions feat: extension and plugin loading system ### Added - Bot modes to determine behavior. Multiple can be applied at once. - PROD: the default mode, no dev extensions or dev plugins load - DEVELOP: the bot developer mode, most useful for people adding features to modmail - Enables the extension_manager extension. - PLUGIN_DEV: the plugin developer mode, useful for enabling plugin specific features - This is not used yet. - Extension loading system - scans for extensions in the `modmail/extensions` folder and loads them if they are of the right format. - all extensions must be loadable as a module, which means they must have `__init__.py` files in their directories. - Plugin loading system - scans for plugins in the `modmail/plugins` folder and loads them. - Unlike extensions, plugins and their respective folders do not need to have `__init__.py` files and are allowed to be symlinks. - Extension management commands - load, reload, unload, list, refresh commands for dealing with extensions - Run the `ext` command for more details when bot is in `DEVELOP` mode. - Plugin management commands - load, reload, unload, list, refresh commands for dealing with plugins - Run the `plugins` command for more details. - Extension metadata - used to determine if a cog should load or not depending on the bot mode - Plugin helper file - `modmail/plugin_helpers.py` contains several helpers for making plugins - `PluginCog` - `ModmailBot`, imported from `modmail.bot` - `ModmailLogger`, imported from `modmail.log` - Meta Cog - NOTE: The commands in this cog are not stabilized yet and should not be relied upon. - Prefix command for getting the set prefix. Most useful by mentioning the bot. - Uptime command which tells the end user how long the bot has been online. - Ping command to see the bot latency. - Guide on how to contribute to modmail, CONTRIBUTING.md - Starts a Changelog ### Fixed - Make the bot http_session within an event loop.