From a26de66f08f3a20d096b7922856a9578303cc1e5 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Thu, 4 Nov 2021 01:07:34 +0100 Subject: [PATCH] Fix pytest --- src/bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 == "":