Fix AttributeError if no voice client

This commit is contained in:
ekzyis 2021-09-25 20:36:15 +02:00
parent c6ea351fa5
commit 01cc686520
1 changed files with 1 additions and 1 deletions

View File

@ -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()