discord-player
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "discord-player", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Complete framework to facilitate music commands using discord.js v12", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -60,8 +60,8 @@ const ytdl = require('ytdl-core'); | ||
// Listener to check if the channel is empty | ||
client.on('voiceStateUpdate', (oldMember, newMember) => { | ||
client.on('voiceStateUpdate', (oldState, newState) => { | ||
if(!this.options.leaveOnEmpty) return; | ||
// If the member leaves a voice channel | ||
if(oldMember.voice.channel && !newMember.voice.channel) return; | ||
if(oldState.channel && !newState.channel) return; | ||
// Search for a queue for this channel | ||
let queue = this.queues.find((g) => g.connection.channel.id === oldMember.voice.channel.id); | ||
let queue = this.queues.find((g) => g.connection.channel.id === oldState.channel.id); | ||
if(queue){ | ||
@@ -68,0 +68,0 @@ // Disconnect from the voice channel |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25951