Guild owners can now use .setrole on anyone

This commit is contained in:
Master Kwoth 2017-05-16 23:22:32 +02:00
parent cd7f2cd63d
commit c45f7bc9ab

View File

@ -118,7 +118,7 @@ namespace NadekoBot.Modules.Administration
{ {
var guser = (IGuildUser)Context.User; var guser = (IGuildUser)Context.User;
var maxRole = guser.GetRoles().Max(x => x.Position); var maxRole = guser.GetRoles().Max(x => x.Position);
if (maxRole < role.Position || maxRole <= usr.GetRoles().Max(x => x.Position)) if ((Context.User.Id != Context.Guild.OwnerId) && (maxRole < role.Position || maxRole <= usr.GetRoles().Max(x => x.Position)))
return; return;
try try
{ {