This commit is contained in:
JonnyBro 2022-08-06 21:11:46 +05:00
parent 16489eba4a
commit ceff32f974

View file

@ -74,12 +74,12 @@ class Loop extends BaseCommand {
idle: 60 * 1000 idle: 60 * 1000
}); });
collector.on("collect", async msg => { collector.on("collect", async i => {
const type = Number(msg?.values[0]); const type = QueueRepeatMode[msg?.values[0]];
queue.setRepeatMode(type); queue.setRepeatMode(type);
await msg.update({ i.update({
content: interaction.translate(`music/loop:${type === 3 ? "AUTOPLAY_ENABLED" : content: interaction.translate(`music/loop:${type === QueueRepeatMode.AUTOPLAY ? "AUTOPLAY_ENABLED" :
type === 2 ? "QUEUE_ENABLED" : type === 1 ? "TRACK_ENABLED" : "LOOP_DISABLED"}`), type === QueueRepeatMode.QUEUE ? "QUEUE_ENABLED" : type === QueueRepeatMode.TRACK ? "TRACK_ENABLED" : "LOOP_DISABLED"}`),
components: [] components: []
}); });
}); });