From 803eae2adcd54d8293f041e5f67e863e87dab5cc Mon Sep 17 00:00:00 2001 From: ErrorNoInternet Date: Tue, 7 Jan 2025 12:38:08 -0500 Subject: [PATCH] feat(commands/voice/skip): add --next --- commands/voice.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/commands/voice.py b/commands/voice.py index f686fe4..5f7fdee 100644 --- a/commands/voice.py +++ b/commands/voice.py @@ -317,6 +317,17 @@ async def fast_forward(message): async def skip(message): + tokens = commands.tokenize(message.content) + parser = arguments.ArgumentParser(tokens[0], "skip the currently playing song") + parser.add_argument( + "-n", + "--next", + action="store_true", + help="skip the next song", + ) + if not (args := await parser.parse_args(message, tokens)): + return + if not command_allowed(message): return @@ -326,6 +337,9 @@ async def skip(message): message, "the queue is empty now!", ) + elif args.next: + next = players[message.guild.id].queue.pop() + await utils.reply(message, f"**skipped** {next.format()}") else: message.guild.voice_client.stop() await utils.add_check_reaction(message)