Allow for multi-module plugins

This commit is contained in:
brosquinha 2024-01-27 16:21:44 -03:00
parent e7f724f042
commit 07221076ca

View File

@ -58,7 +58,10 @@ class PluginManager(_AbstractManager):
await self.load(plugin_package)
async def load(self, module):
plugin_class, plugin_type = inspect.getmembers(module, is_plugin).pop()
try:
plugin_class, plugin_type = inspect.getmembers(module, is_plugin).pop()
except IndexError:
return
plugin_index = plugin_class.lower()
if self.server.config.plugins != '*' and \