You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
506 B
19 lines
506 B
namespace Discord
|
|
{
|
|
internal static class RoleUtils
|
|
{
|
|
public static int Compare(IRole left, IRole right)
|
|
{
|
|
if (left == null)
|
|
return -1;
|
|
if (right == null)
|
|
return 1;
|
|
var result = left.Position.CompareTo(right.Position);
|
|
// As per Discord's documentation, a tie is broken by ID
|
|
if (result != 0)
|
|
return result;
|
|
return left.Id.CompareTo(right.Id);
|
|
}
|
|
}
|
|
}
|