.rar fixed, closes #1306
This commit is contained in:
		@@ -126,17 +126,17 @@ namespace NadekoBot.Modules.Administration
 | 
				
			|||||||
        {
 | 
					        {
 | 
				
			||||||
            var guser = (IGuildUser)Context.User;
 | 
					            var guser = (IGuildUser)Context.User;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            var userRoles = user.GetRoles();
 | 
					            var userRoles = user.GetRoles().Except(new[] { guser.Guild.EveryoneRole });
 | 
				
			||||||
            if (guser.Id != Context.Guild.OwnerId && 
 | 
					            if (user.Id == Context.Guild.OwnerId || (Context.User.Id != Context.Guild.OwnerId && guser.GetRoles().Max(x => x.Position) <= userRoles.Max(x => x.Position)))
 | 
				
			||||||
                (user.Id == Context.Guild.OwnerId || guser.GetRoles().Max(x => x.Position) <= userRoles.Max(x => x.Position)))
 | 
					 | 
				
			||||||
                return;
 | 
					                return;
 | 
				
			||||||
            try
 | 
					            try
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                await user.RemoveRolesAsync(userRoles).ConfigureAwait(false);
 | 
					                await user.RemoveRolesAsync(userRoles).ConfigureAwait(false);
 | 
				
			||||||
                await ReplyConfirmLocalized("rar", Format.Bold(user.ToString())).ConfigureAwait(false);
 | 
					                await ReplyConfirmLocalized("rar", Format.Bold(user.ToString())).ConfigureAwait(false);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            catch
 | 
					            catch (Exception ex)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
 | 
					                Console.WriteLine(ex);
 | 
				
			||||||
                await ReplyErrorLocalized("rar_err").ConfigureAwait(false);
 | 
					                await ReplyErrorLocalized("rar_err").ConfigureAwait(false);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user