pausing disabled again due to issues

This commit is contained in:
Master Kwoth 2017-07-03 13:18:13 +02:00
parent 99049a6ace
commit 421431d01d

View File

@ -63,27 +63,27 @@ namespace NadekoBot.Modules.Music
if ((player.VoiceChannel == oldState.VoiceChannel) && if ((player.VoiceChannel == oldState.VoiceChannel) &&
usr.Id == _client.CurrentUser.Id) usr.Id == _client.CurrentUser.Id)
{ {
if (player.Paused && newState.VoiceChannel.Users.Count > 1) //unpause if there are people in the new channel //if (player.Paused && newState.VoiceChannel.Users.Count > 1) //unpause if there are people in the new channel
player.TogglePause(); // player.TogglePause();
else if (!player.Paused && newState.VoiceChannel.Users.Count <= 1) // pause if there are no users in the new channel //else if (!player.Paused && newState.VoiceChannel.Users.Count <= 1) // pause if there are no users in the new channel
player.TogglePause(); // player.TogglePause();
player.SetVoiceChannel(newState.VoiceChannel); player.SetVoiceChannel(newState.VoiceChannel);
return; return;
} }
//if some other user moved ////if some other user moved
if ((player.VoiceChannel == newState.VoiceChannel && //if joined first, and player paused, unpause //if ((player.VoiceChannel == newState.VoiceChannel && //if joined first, and player paused, unpause
player.Paused && // player.Paused &&
newState.VoiceChannel.Users.Count >= 2) || // keep in mind bot is in the channel (+1) // newState.VoiceChannel.Users.Count >= 2) || // keep in mind bot is in the channel (+1)
(player.VoiceChannel == oldState.VoiceChannel && // if left last, and player unpaused, pause // (player.VoiceChannel == oldState.VoiceChannel && // if left last, and player unpaused, pause
!player.Paused && // !player.Paused &&
oldState.VoiceChannel.Users.Count == 1)) // oldState.VoiceChannel.Users.Count == 1))
{ //{
player.TogglePause(); // player.TogglePause();
return; // return;
} //}
} }
catch catch
{ {