Wycademy/src/Wycademy/WycademyExtensions.cs
/// <summary>
/// Gets the colour of a user's highest role.
/// </summary>
/// <returns>The user's highest role colour, or <see cref="Color.Default"/> if the user does not have any coloured roles.</returns>
Gets the colour of a user's highest role.
Gets the colour of a user ' s highest role .
public static Color GetHighestRoleColour(this IGuildUser user)
        {
            var roles = user.RoleIds.Select(i => user.Guild.GetRole(i)).OrderByDescending(r => r.Position);
            var firstColouredRole = roles.FirstOrDefault(r => !r.Color.Equals(Color.Default));
            return firstColouredRole?.Color ?? Color.Default;
        }
public static Color GetHighestRoleColour ( this IGuildUser user ) { var roles = user . RoleIds . Select ( i => user . Guild . GetRole ( i ) ) . OrderByDescending ( r => r . Position ) ; var firstColouredRole = roles . FirstOrDefault ( r => ! r . Color . Equals ( Color . Default ) ) ; return firstColouredRole ? . Color ?? Color . Default ; }
Gets the colour of a user's highest role.
Gets the colour of a user ' s highest role .
// Get all the user's roles, ordered by position in the role hierarchy. // Get the first role that has a colour, or null if none have a colour. // Return the colour if applicable, otherwise return the default colour.
The user's highest role colour, or  if the user does not have any coloured roles.
The user ' s highest role colour or if the user does not have any coloured roles .
IGuildUser
this