1
Fork 0
mirror of https://github.com/wlinator/luminara.git synced 2024-10-02 18:03:12 +00:00

refactor: Update logger to use constants for title and version

This commit is contained in:
wlinator 2024-07-19 15:42:19 -04:00
parent e27037325e
commit 8da2b15b82

View file

@ -7,7 +7,7 @@ from discord.ext import bridge, commands
from discord.ext.commands import EmojiConverter, TextChannelConverter from discord.ext.commands import EmojiConverter, TextChannelConverter
from loguru import logger from loguru import logger
from lib import metadata from lib.constants import CONST
class LumiBot(bridge.Bot): class LumiBot(bridge.Bot):
@ -18,7 +18,7 @@ class LumiBot(bridge.Bot):
Logs various information about the bot and the environment it is running on. Logs various information about the bot and the environment it is running on.
Note: This function isn't guaranteed to only be called once. The event is called when a RESUME request fails. Note: This function isn't guaranteed to only be called once. The event is called when a RESUME request fails.
""" """
logger.info(f"{metadata.__title__} v{metadata.__version__}") logger.info(f"{CONST.TITLE} v{CONST.VERSION}")
logger.info(f"Logged in with ID {self.user.id if self.user else 'Unknown'}") logger.info(f"Logged in with ID {self.user.id if self.user else 'Unknown'}")
logger.info(f"discord.py API version: {discord.__version__}") logger.info(f"discord.py API version: {discord.__version__}")
logger.info(f"Python version: {platform.python_version()}") logger.info(f"Python version: {platform.python_version()}")