from datetime import datetime from cpl_core.configuration.configuration_abc import ConfigurationABC from cpl_core.logging import LoggerABC from gismo_core.abc.bot_service_abc import BotServiceABC from modules_core.abc.module_abc import ModuleABC from modules_core.abc.module_service_abc import ModuleServiceABC class BootLog(ModuleABC): def __init__(self, config: ConfigurationABC, logger: LoggerABC): self._config = config self._logger = logger ModuleABC.__init__(self) async def on_ready(self): self._logger.info(__name__, f'Bot started') start_time = self._config.get_configuration('StartTime') init_time = round((datetime.now() - start_time).total_seconds(), 2) self._logger.debug(__name__, f'InitTime: {init_time}s')