From 8f28541c508f2e8538380785646c2fa8663d9d74 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Sun, 9 Jan 2022 23:20:06 +0500 Subject: [PATCH] =?UTF-8?q?queue=20=D0=B8=20song=20=D0=B4=D0=BB=D1=8F=20lo?= =?UTF-8?q?op?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/Music/loop.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/commands/Music/loop.js b/commands/Music/loop.js index 73f287e5..a462c565 100644 --- a/commands/Music/loop.js +++ b/commands/Music/loop.js @@ -18,12 +18,20 @@ class Loop extends Command { async run(message, args) { const voice = message.member.voice.channel; + const type = args[0]; const queue = this.client.player.getQueue(message); if (!voice) return message.error("music/play:NO_VOICE_CHANNEL"); if (!queue) return message.error("music/play:NOT_PLAYING"); - const mode = this.client.player.setRepeatMode(message); + let mode = null; + if (type === "queue") { + mode = this.client.player.setRepeatMode(message, 2); + } else if (type === "song") { + mode = this.client.player.setRepeatMode(message, 1); + } else { + mode = this.client.player.setRepeatMode(message, 0); + }; message.success(`music/loop:${mode ? mode === 2 ? "QUEUE" : "SONG" : "DISABLED"}`) }