Fix pytest
This commit is contained in:
parent
85ec8c95a5
commit
a26de66f08
|
@ -28,7 +28,7 @@ class Song:
|
||||||
|
|
||||||
|
|
||||||
class Music(commands.Cog):
|
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._bot = bot
|
||||||
self._queue = asyncio.Queue()
|
self._queue = asyncio.Queue()
|
||||||
self._queue_lock = asyncio.Lock()
|
self._queue_lock = asyncio.Lock()
|
||||||
|
@ -55,7 +55,7 @@ class Music(commands.Cog):
|
||||||
# pylint: disable=no-member
|
# pylint: disable=no-member
|
||||||
self._handle_playback.start()
|
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):
|
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)
|
clear_on_startup = os.environ.get("DISCORD_LOG_CHANNEL_CLEAR_ON_STARTUP", False)
|
||||||
if clear_on_startup == "":
|
if clear_on_startup == "":
|
||||||
|
|
Loading…
Reference in New Issue