diff --git a/bot/plugin_manager.py b/bot/plugin_manager.py index 4f9b5a1b..ccf6ec6e 100644 --- a/bot/plugin_manager.py +++ b/bot/plugin_manager.py @@ -16,16 +16,16 @@ class PluginManager: def __init__(self, config): enabled_plugins = config.get('plugins', []) plugin_mapping = { - 'wolfram': WolframAlphaPlugin(), - 'weather': WeatherPlugin(), - 'crypto': CryptoPlugin(), - 'web_search': WebSearchPlugin(), - 'spotify': SpotifyPlugin(), - 'translate': TranslatePlugin(), - 'image_search': ImageSearchPlugin(), - 'worldtimeapi': WorldTimeApiPlugin(), + 'wolfram': WolframAlphaPlugin, + 'weather': WeatherPlugin, + 'crypto': CryptoPlugin, + 'web_search': WebSearchPlugin, + 'spotify': SpotifyPlugin, + 'translate': TranslatePlugin, + 'image_search': ImageSearchPlugin, + 'worldtimeapi': WorldTimeApiPlugin, } - self.plugins = [plugin_mapping[plugin] for plugin in enabled_plugins] + self.plugins = [plugin_mapping[plugin]() for plugin in enabled_plugins if plugin in plugin_mapping] def get_functions_specs(self): """