diff options
| author | salmonik <raisersoft@proton.me> | 2026-04-10 15:08:03 +0200 |
|---|---|---|
| committer | salmonik <raisersoft@proton.me> | 2026-04-10 15:08:03 +0200 |
| commit | c27338b0ce8e44c2a7a18ca32181a63bd94abc13 (patch) | |
| tree | 68dab6bf54ac9f21a7fb81e6cfecb6f7c8c87deb /cogs/music/audio_playback.py | |
| parent | make it work + visual changes (diff) | |
| download | senator-sperma-c27338b0ce8e44c2a7a18ca32181a63bd94abc13.tar.gz senator-sperma-c27338b0ce8e44c2a7a18ca32181a63bd94abc13.zip | |
fix voice for the 9th time today, still on the way
Diffstat (limited to '')
| -rw-r--r-- | cogs/music/audio_playback.py | 4 |
1 files changed, 3 insertions, 1 deletions
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: | |||
| 54 | async def connect_to_voice_channel(ctx, vc, target_channel): | 54 | async def connect_to_voice_channel(ctx, vc, target_channel): |
| 55 | """Connect or move to voice channel. Returns voice client.""" | 55 | """Connect or move to voice channel. Returns voice client.""" |
| 56 | try: | 56 | try: |
| 57 | # Check if vc is valid and actually connected | ||
| 58 | is_connected = vc is not None and vc.is_connected() | ||
| 57 | # Connect to voice channel if not connected | 59 | # Connect to voice channel if not connected |
| 58 | if vc is None: | 60 | if not is_connected: |
| 59 | logger.info(f"Connecting to voice channel: {target_channel.name}") | 61 | logger.info(f"Connecting to voice channel: {target_channel.name}") |
| 60 | vc = await target_channel.connect() | 62 | vc = await target_channel.connect() |
| 61 | logger.info(f"Connected to voice channel: {target_channel.name}") | 63 | logger.info(f"Connected to voice channel: {target_channel.name}") |
