A-0.1 - Modularer Aufbau #13

Merged
edraft merged 118 commits from 0.1 into Alpha 2021-11-25 21:02:12 +01:00
Showing only changes of commit 0b5f47ab8a - Show all commits

View File

@ -5,6 +5,7 @@ from discord import guild
from async_timeout import asyncio from async_timeout import asyncio
from cpl_core.configuration import ConfigurationABC from cpl_core.configuration import ConfigurationABC
from cpl_core.console import Console from cpl_core.console import Console
from cpl_core.environment import ApplicationEnvironmentABC
from cpl_core.logging import LoggerABC, LoggingLevelEnum, LoggingSettings from cpl_core.logging import LoggerABC, LoggingLevelEnum, LoggingSettings
from gismo_core.abc.bot_service_abc import BotServiceABC from gismo_core.abc.bot_service_abc import BotServiceABC
from gismo_core.abc.message_service_abc import MessageServiceABC from gismo_core.abc.message_service_abc import MessageServiceABC
@ -18,12 +19,14 @@ class BootLog(ModuleABC, OnReadyABC):
def __init__( def __init__(
self, self,
config: ConfigurationABC, config: ConfigurationABC,
env: ApplicationEnvironmentABC,
logging_st: LoggingSettings, logging_st: LoggingSettings,
logger: LoggerABC, logger: LoggerABC,
bot: BotServiceABC, bot: BotServiceABC,
message_service: MessageServiceABC message_service: MessageServiceABC
): ):
self._config = config self._config = config
self._env = env
self._logging_st = logging_st self._logging_st = logging_st
self._logger = logger self._logger = logger
@ -55,7 +58,7 @@ class BootLog(ModuleABC, OnReadyABC):
self._logger.header(f'{self._bot.user.name}:') self._logger.header(f'{self._bot.user.name}:')
if self._logging_st.console.value >= LoggingLevelEnum.INFO.value: if self._logging_st.console.value >= LoggingLevelEnum.INFO.value:
Console.banner(self._bot.user.name) Console.banner(self._env.application_name if self._env.application_name != '' else 'Gismo')
for g in self._bot.guilds: for g in self._bot.guilds:
g: guild = g g: guild = g