Skip to content

Commit

Permalink
commands(shuffle): don't shuffle if music isn't playing
Browse files Browse the repository at this point in the history
Signed-off-by: TRACTION <19631364+iamtraction@users.noreply.github.com>
  • Loading branch information
iamtraction committed Oct 22, 2023
1 parent 3cb51da commit 4c9e702
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/commands/music/shuffle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ class ShuffleCommand extends Command {
public async exec(interaction: ChatInputCommandInteraction<"cached">): Promise<unknown> {
const studio = (interaction.client as Client).studio.get(interaction.guild);

// shuffle the music queue
arrays.shuffle(studio.queue);

if (studio?.queue?.length) {
// shuffle the music queue
arrays.shuffle(studio.queue);

return await interaction.reply({ content: (interaction.client as Client).locales.getText(interaction.guildLocale, "musicQueueShuffle") });
}

Expand Down

0 comments on commit 4c9e702

Please sign in to comment.