feat(commands/voice/skip): add --next

This commit is contained in:
Ryan 2025-01-07 12:38:08 -05:00
parent 1b781ac6a0
commit 803eae2adc
Signed by: ErrorNoInternet
GPG Key ID: 2486BFB7B1E6A4A3

View File

@ -317,6 +317,17 @@ async def fast_forward(message):
async def skip(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): if not command_allowed(message):
return return
@ -326,6 +337,9 @@ async def skip(message):
message, message,
"the queue is empty now!", "the queue is empty now!",
) )
elif args.next:
next = players[message.guild.id].queue.pop()
await utils.reply(message, f"**skipped** {next.format()}")
else: else:
message.guild.voice_client.stop() message.guild.voice_client.stop()
await utils.add_check_reaction(message) await utils.add_check_reaction(message)