diff --git a/src/modules/boot_log/main.py b/src/modules/boot_log/main.py index 6a46716..23ba19f 100644 --- a/src/modules/boot_log/main.py +++ b/src/modules/boot_log/main.py @@ -7,12 +7,9 @@ from modules_core.abc.module_service_abc import ModuleServiceABC class BootLog(ModuleABC): - def __init__(self, logger: LoggerABC, bot: BotServiceABC): + def __init__(self, logger: LoggerABC): self._logger = logger - self._bot = bot - - self._logger.info(__name__, 'LOADED') ModuleABC.__init__(self) async def on_ready(self): - self._logger.info(__name__, f'Bot started: {self._bot}') + self._logger.info(__name__, f'Bot started') diff --git a/src/modules_core/service/module_service.py b/src/modules_core/service/module_service.py index 359d9e6..e7264a5 100644 --- a/src/modules_core/service/module_service.py +++ b/src/modules_core/service/module_service.py @@ -23,9 +23,7 @@ class ModuleService(ModuleServiceABC): self._modules.extend(ModuleABC.__subclasses__()) async def start_modules(self): - self._logger.info(__name__, self._modules) - modules = self._modules.where(lambda m: hasattr(m, 'on_ready')) - self._logger.info(__name__, f'HIER: {modules}') + modules = self._modules.where(lambda m: hasattr(m, 'on_ready') and callable(m.on_ready)) for module_type in modules: module = self._services.get_service(module_type) await module.on_ready()