Fix pytest

This commit is contained in:
ekzyis 2021-11-04 01:07:34 +01:00
parent 85ec8c95a5
commit a26de66f08
1 changed files with 2 additions and 2 deletions

View File

@ -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 == "":