From 01cc686520a26886320d43d3e1b2b8900fcc89bc Mon Sep 17 00:00:00 2001 From: ekzyis Date: Sat, 25 Sep 2021 20:36:15 +0200 Subject: [PATCH] Fix AttributeError if no voice client --- src/bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bot.py b/src/bot.py index 1440562..a21b94d 100644 --- a/src/bot.py +++ b/src/bot.py @@ -79,7 +79,7 @@ class Music(commands.Cog): @commands.command() async def skip(self, ctx): async with ctx.typing(): - if not ctx.voice_client.is_playing(): + if ctx.voice_client is None or not ctx.voice_client.is_playing(): raise commands.CommandError("Cannot skip: No song playing") ctx.voice_client.stop()