Fix AttributeError if no voice client
This commit is contained in:
parent
c6ea351fa5
commit
01cc686520
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue