Open alikindsys opened 4 years ago
Maybe consider also GetLowestRole
and GetLowestRoleWithPermission
++ Role GetLowestRole(this Member m,Func<Role,bool> pred);
++ Role GetLowestRole(this Member m) => m.GetLowestRole(_ => true);
++ Role GetLowestRoleWithPermission(this Member m,Perm p) => m.GetLowestRole(x => x.HasPermission(p);
Does the lowest role of a member have any significance? It seems to me that the lowest role is no different than any other roll that isn't the highest when it comes to actual permissions. If anything, I'd worry that the existence of an explicit GetLowestRole
would make people write very unintuitive code that doesn't match default discord behaviour at all.
Fair point, thanks for reminding why it weren't implemented in the first place.
Add extensions for getting the highest role with a given permission and allow predicates on
GetHighestRole