Add skip command
This commit is contained in:
parent
80041b22ef
commit
b0a885fca1
|
@ -76,6 +76,13 @@ class Music(commands.Cog):
|
||||||
if ctx.voice_client.is_playing():
|
if ctx.voice_client.is_playing():
|
||||||
await ctx.send(f"Queued: {title}")
|
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()
|
@commands.command()
|
||||||
async def stop(self, ctx):
|
async def stop(self, ctx):
|
||||||
await ctx.voice_client.disconnect()
|
await ctx.voice_client.disconnect()
|
||||||
|
|
Loading…
Reference in New Issue