Add skip command

This commit is contained in:
ekzyis 2021-09-25 20:30:38 +02:00
parent 80041b22ef
commit b0a885fca1
1 changed files with 7 additions and 0 deletions

View File

@ -76,6 +76,13 @@ class Music(commands.Cog):
if ctx.voice_client.is_playing():
await ctx.send(f"Queued: {title}")
@commands.command()
async def skip(self, ctx):
async with ctx.typing():
if not ctx.voice_client.is_playing():
raise commands.CommandError("Cannot skip: No song playing")
ctx.voice_client.stop()
@commands.command()
async def stop(self, ctx):
await ctx.voice_client.disconnect()