diff --git a/src/NadekoBot/Modules/Administration/Administration.cs b/src/NadekoBot/Modules/Administration/Administration.cs index 15185ca3..56a0affc 100644 --- a/src/NadekoBot/Modules/Administration/Administration.cs +++ b/src/NadekoBot/Modules/Administration/Administration.cs @@ -126,17 +126,17 @@ namespace NadekoBot.Modules.Administration { var guser = (IGuildUser)Context.User; - var userRoles = user.GetRoles(); - if (guser.Id != Context.Guild.OwnerId && - (user.Id == Context.Guild.OwnerId || guser.GetRoles().Max(x => x.Position) <= userRoles.Max(x => x.Position))) + var userRoles = user.GetRoles().Except(new[] { guser.Guild.EveryoneRole }); + if (user.Id == Context.Guild.OwnerId || (Context.User.Id != Context.Guild.OwnerId && guser.GetRoles().Max(x => x.Position) <= userRoles.Max(x => x.Position))) return; try { await user.RemoveRolesAsync(userRoles).ConfigureAwait(false); await ReplyConfirmLocalized("rar", Format.Bold(user.ToString())).ConfigureAwait(false); } - catch + catch (Exception ex) { + Console.WriteLine(ex); await ReplyErrorLocalized("rar_err").ConfigureAwait(false); } }