From ceff32f974a8c27cc71a9c66507c27060d0b4f2f Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Sat, 6 Aug 2022 21:11:46 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/Music/loop.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/commands/Music/loop.js b/commands/Music/loop.js index 015a82ce..2840f376 100644 --- a/commands/Music/loop.js +++ b/commands/Music/loop.js @@ -74,12 +74,12 @@ class Loop extends BaseCommand { idle: 60 * 1000 }); - collector.on("collect", async msg => { - const type = Number(msg?.values[0]); + collector.on("collect", async i => { + const type = QueueRepeatMode[msg?.values[0]]; queue.setRepeatMode(type); - await msg.update({ - content: interaction.translate(`music/loop:${type === 3 ? "AUTOPLAY_ENABLED" : - type === 2 ? "QUEUE_ENABLED" : type === 1 ? "TRACK_ENABLED" : "LOOP_DISABLED"}`), + i.update({ + content: interaction.translate(`music/loop:${type === QueueRepeatMode.AUTOPLAY ? "AUTOPLAY_ENABLED" : + type === QueueRepeatMode.QUEUE ? "QUEUE_ENABLED" : type === QueueRepeatMode.TRACK ? "TRACK_ENABLED" : "LOOP_DISABLED"}`), components: [] }); });