fix music

This commit is contained in:
Lukáš Horáček 2020-03-31 13:46:46 +02:00
parent 709cf975cb
commit 9f02a5956b
No known key found for this signature in database
GPG key ID: E07D6630DBC17195

View file

@ -79,6 +79,15 @@ module.exports = client => {
id = item.id.videoId id = item.id.videoId
} }
// music "playing", nothing in queue
if((client.music.getGuild(message.guild.id).playing || client.music.getGuild(message.guild.id).dispatcher) && client.music.getGuild(message.guild.id).queue.length == 0) {
client.music.getGuild(message.guild.id).playing = false;
client.music.getGuild(message.guild.id).dispatcher = null;
// music not playing, something is in queue
} else if(!client.music.getGuild(message.guild.id).playing && !client.music.getGuild(message.guild.id).dispatcher && client.music.getGuild(message.guild.id).queue.length > 0) {
client.music.getGuild(message.guild.id).queue = [];
};
if(client.music.getGuild(message.guild.id).queue.length == 0 || bypassQueue) if(client.music.getGuild(message.guild.id).queue.length == 0 || bypassQueue)
{ {
let meta = await client.music.getMeta(id) let meta = await client.music.getMeta(id)