diff --git a/src/bot.py b/src/bot.py index 1f07080..0692a1c 100644 --- a/src/bot.py +++ b/src/bot.py @@ -28,7 +28,7 @@ class Song: class Music(commands.Cog): - def __init__(self, bot: commands.Bot, logger: logging.Logger): + def __init__(self, bot: commands.Bot, logger: logging.Logger = None): self._bot = bot self._queue = asyncio.Queue() self._queue_lock = asyncio.Lock() @@ -55,7 +55,7 @@ class Music(commands.Cog): # pylint: disable=no-member self._handle_playback.start() - self.logger = logger + self.logger = logger if logger else create_logger("bot") if log_channel_id := os.environ.get("DISCORD_LOG_CHANNEL_ID", None): clear_on_startup = os.environ.get("DISCORD_LOG_CHANNEL_CLEAR_ON_STARTUP", False) if clear_on_startup == "":