-
Notifications
You must be signed in to change notification settings - Fork 631
Closed
Labels
Description
Currently to implement a plugin, the BotPlugin class is extended and members registered with @botcmd. In turn, BotPlugin extends StorageMixin which is hard-coded to use shelve as its storage mechanism. This is very inconvenient for creating new storage implementations, as well as for testing — these dependencies should be parameterized and composed instead of inherited. This approach would allow me to easily drop in a Redis Collection as the storage mechanism, for instance, since it also supports a dict-like interface (MutableMapping). This would also easily support configurable storage backends based on a flag passed to the application.
Really any dependencies should use this method but storage is the most obvious candidate right now.