From 4663f260b55de0975661fda1c00f60d2ca6e4506 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 20 May 2026 15:40:18 +0200 Subject: Clean up consumers: replace polling with VoiceManager.play_source() - cron.py: replace while-is_playing polling with VoiceManager.play_source() - vclogs.py: replace while-is_playing polling with VoiceManager.play_source() - stop.py: use VoiceManager.disconnect() instead of raw voice_client - join.py: use VoiceManager.connect() instead of raw channel.connect() - voice.py: add back join_by_channel_id() convenience method - Tests: update for new VoiceManager method names and signatures --- tests/cogs/test_music_audio.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/cogs/test_music_audio.py') diff --git a/tests/cogs/test_music_audio.py b/tests/cogs/test_music_audio.py index 705f1b3..150ad5d 100644 --- a/tests/cogs/test_music_audio.py +++ b/tests/cogs/test_music_audio.py @@ -59,7 +59,7 @@ async def test_prepare_file_source_absolute_path(): async def test_prepare_source_url(): from cogs.music.audio_playback import AudioPlaybackManager - source, _, is_url = await AudioPlaybackManager.prepare_source(MagicMock(), "https://example.com/stream") + source, _, is_url = await AudioPlaybackManager.prepare_source("https://example.com/stream") assert is_url == True assert source == "https://example.com/stream" @@ -70,7 +70,7 @@ async def test_prepare_source_local_file(): from cogs.music.audio_playback import AudioPlaybackManager with patch('os.path.exists', return_value=True): - source, display_name, is_url = await AudioPlaybackManager.prepare_source(MagicMock(), "/tmp/test.mp3") + source, display_name, is_url = await AudioPlaybackManager.prepare_source("/tmp/test.mp3") assert is_url == False assert display_name == "test" -- cgit v1.2.3