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()
|
@commands.command()
|
||||||
async def skip(self, ctx):
|
async def skip(self, ctx):
|
||||||
async with ctx.typing():
|
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")
|
raise commands.CommandError("Cannot skip: No song playing")
|
||||||
ctx.voice_client.stop()
|
ctx.voice_client.stop()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue