21 lines
881 B
JavaScript
21 lines
881 B
JavaScript
|
|
||
|
const { MessageEmbed } = require("discord.js");
|
||
|
|
||
|
module.exports = {
|
||
|
name: 'queue', // Optional
|
||
|
aliases: ['q'], // Optional
|
||
|
category: 'Music',
|
||
|
description: 'Gibt Ihnen Informationen über die Serverwarteschlange',
|
||
|
run: async (client, message, args) => {
|
||
|
const voice_channel = message.member.voice.channel;
|
||
|
const embed = new MessageEmbed()
|
||
|
.setColor('#FF5757')
|
||
|
.setDescription(`Sie müssen sich in einem vc befinden, um diesen Befehl auszuführen!`)
|
||
|
if (!voice_channel) return message.channel.send(embed);
|
||
|
let queue = client.player.getQueue(message);
|
||
|
if(queue)
|
||
|
message.channel.send('Warteschlange:\n'+(queue.songs.map((song, i) => {
|
||
|
return `${i === 0 ? 'etzt läuft' : `#${i+1}`} - ${song.name} | ${song.author}`
|
||
|
}).join('\n')));
|
||
|
}
|
||
|
}
|