From bf497bf824a15b0470e4b0d315690db6a190bf21 Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Wed, 19 Jul 2023 18:25:42 +1000 Subject: [PATCH] Add skip command to music player --- src/commands/music.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/commands/music.ts b/src/commands/music.ts index f12c88d..dbb11d0 100644 --- a/src/commands/music.ts +++ b/src/commands/music.ts @@ -69,6 +69,10 @@ export default { remove: ()=>{ useQueue(interaction.guildId).removeTrack(interaction.options.getNumber('id',true)); interaction.reply('Song has been removed from the queue.') + }, + skip: ()=>{ + useQueue(interaction.guildId).node.skip(); + interaction.reply('Skipped the current song, now playing the next one in queue.') } } as any)[interaction.options.getSubcommand()](); }, @@ -85,6 +89,9 @@ export default { .addSubcommand(x=>x .setName('stop') .setDescription('Stop playing music and disconnect the bot from voice channel')) + .addSubcommand(x=>x + .setName('skip') + .setDescription('Skip the current song and play the next one')) .addSubcommand(x=>x .setName('pause') .setDescription('Pause/unpause the music'))