From 1a2475454907dc82dccdec903c836cf431cc4fe5 Mon Sep 17 00:00:00 2001 From: ErrorNoInternet Date: Mon, 3 Feb 2025 16:24:47 -0500 Subject: [PATCH] refactor(commands/voice/queue): check for voice_client --- commands/voice/queue.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/commands/voice/queue.py b/commands/voice/queue.py index f7d69d7..069bfd6 100644 --- a/commands/voice/queue.py +++ b/commands/voice/queue.py @@ -171,7 +171,10 @@ async def queue_or_play(message, edited=False): else: players[message.guild.id].queue_add(queued) - if not message.guild.voice_client.source: + if not message.guild.voice_client: + await utils.reply(message, "unexpected disconnect from voice channel!") + return + elif not message.guild.voice_client.source: play_next(message, first=True) elif args.now: message.guild.voice_client.stop()