mirror of
https://github.com/musix-org/musix-oss
synced 2024-11-10 08:10:18 +00:00
24 lines
770 B
JavaScript
24 lines
770 B
JavaScript
module.exports = {
|
|
name: 'loopsong',
|
|
alias: 'loops',
|
|
usage: '',
|
|
description: 'loop the currently playing song.',
|
|
onlyDev: false,
|
|
permission: 'MANAGE_MESSAGES',
|
|
category: 'music',
|
|
async execute(msg, args, client, Discord, prefix, command) {
|
|
const queue = client.queue.get(msg.guild.id);
|
|
if (client.funcs.check(client, msg, command)) {
|
|
if (!queue.songLooping) {
|
|
queue.songLooping = true;
|
|
let message;
|
|
message = client.messages.loopingSong.replace("%TITLE%", queue.songs[0].title);
|
|
msg.channel.send(message);
|
|
} else {
|
|
queue.songLooping = false;
|
|
msg.channel.send(message);
|
|
}
|
|
}
|
|
}
|
|
};
|