From c27338b0ce8e44c2a7a18ca32181a63bd94abc13 Mon Sep 17 00:00:00 2001 From: salmonik Date: Fri, 10 Apr 2026 15:08:03 +0200 Subject: fix voice for the 9th time today, still on the way --- cogs/music/audio_playback.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cogs/music') diff --git a/cogs/music/audio_playback.py b/cogs/music/audio_playback.py index d23809a..5632728 100644 --- a/cogs/music/audio_playback.py +++ b/cogs/music/audio_playback.py @@ -54,8 +54,10 @@ class AudioPlaybackManager: async def connect_to_voice_channel(ctx, vc, target_channel): """Connect or move to voice channel. Returns voice client.""" try: + # Check if vc is valid and actually connected + is_connected = vc is not None and vc.is_connected() # Connect to voice channel if not connected - if vc is None: + if not is_connected: logger.info(f"Connecting to voice channel: {target_channel.name}") vc = await target_channel.connect() logger.info(f"Connected to voice channel: {target_channel.name}") -- cgit v1.2.3