Improved bot banner
This commit is contained in:
parent
00a0c182be
commit
0b5f47ab8a
@ -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
|
||||||
|
Reference in New Issue
Block a user