This repository has been archived on 2026-03-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
legacy-musicbot/commands/loop.js
2020-11-15 18:51:29 +01:00

20 lines
719 B
JavaScript

const emotes = require("../config/emojis.json");
exports.run = async (client, message) => {
if (!message.member.voice.channel) return message.channel.send(`You're not in a voice channel ${emotes.error}`);
if (!client.player.getQueue(message)) return message.channel.send(`No music playing on this server ${emotes.error}`);
const repeatMode = client.player.getQueue(message).repeatMode;
if (repeatMode) {
client.player.setRepeatMode(message, false);
return message.channel.send(`Repeat mode **disabled** ${emotes.success}`);
} else {
client.player.setRepeatMode(message, true);
return message.channel.send(`Repeat mode **enabled** ${emotes.success}`);
};
};