forked from embee/woomy
		
	a
This commit is contained in:
		
							parent
							
								
									5769195df9
								
							
						
					
					
						commit
						fb31e369f8
					
				
					 2 changed files with 18 additions and 17 deletions
				
			
		| 
						 | 
				
			
			@ -6,16 +6,17 @@ module.exports = (client, oldState, newState) => {
 | 
			
		|||
  if (newState.channelID !== oldState.channelID) {
 | 
			
		||||
    const guild = music.getGuild(newState.guild.id)
 | 
			
		||||
 | 
			
		||||
    // Reset queue, dispatcher, etc if Woomy is forcibly disconnected from the queue
 | 
			
		||||
    if (!guild.voiceChannel.members.get(client.user.id) && guild.queue.length > 0) {
 | 
			
		||||
    /* Reset queue, dispatcher, etc if Woomy is forcibly disconnected from the queue
 | 
			
		||||
    if (guild.voiceChannel && !guild.voiceChannel.members.get(client.user.id) && guild.queue.length > 0) {
 | 
			
		||||
      guild.queue = []
 | 
			
		||||
      guild.playing = false
 | 
			
		||||
      guild.paused = false
 | 
			
		||||
      guild.skippers = []
 | 
			
		||||
    }
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
    // Auto-disconnect feature
 | 
			
		||||
    if (guild.playing && guild.voiceChannel.id === oldState.channelID) {
 | 
			
		||||
    if (guild.playing && guild.Channel && guild.voiceChannel.id === oldState.channelID) {
 | 
			
		||||
      if (guild.voiceChannel.members.filter(member => !member.user.bot).size < 1) {
 | 
			
		||||
        guild.autoDisconnect = true
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue