| @@ -1,8 +1,8 @@ | |||||
| namespace Discord | namespace Discord | ||||
| { | { | ||||
| internal static class RoleExtensions | |||||
| internal static class RoleUtils | |||||
| { | { | ||||
| internal static int Compare(this IRole left, IRole right) | |||||
| public static int Compare(IRole left, IRole right) | |||||
| { | { | ||||
| if (left == null) | if (left == null) | ||||
| return -1; | return -1; | ||||
| @@ -51,7 +51,7 @@ namespace Discord.Rest | |||||
| public Task DeleteAsync(RequestOptions options = null) | public Task DeleteAsync(RequestOptions options = null) | ||||
| => RoleHelper.DeleteAsync(this, Discord, options); | => RoleHelper.DeleteAsync(this, Discord, options); | ||||
| public int CompareTo(IRole role) => this.Compare(role); | |||||
| public int CompareTo(IRole role) => RoleUtils.Compare(this, role); | |||||
| public override string ToString() => Name; | public override string ToString() => Name; | ||||
| private string DebuggerDisplay => $"{Name} ({Id})"; | private string DebuggerDisplay => $"{Name} ({Id})"; | ||||
| @@ -54,8 +54,9 @@ namespace Discord.WebSocket | |||||
| private string DebuggerDisplay => $"{Name} ({Id})"; | private string DebuggerDisplay => $"{Name} ({Id})"; | ||||
| internal SocketRole Clone() => MemberwiseClone() as SocketRole; | internal SocketRole Clone() => MemberwiseClone() as SocketRole; | ||||
| public int CompareTo(IRole role) => RoleUtils.Compare(this, role); | |||||
| //IRole | //IRole | ||||
| IGuild IRole.Guild => Guild; | IGuild IRole.Guild => Guild; | ||||
| public int CompareTo(IRole role) => this.CompareTo(role); | |||||
| } | } | ||||
| } | } | ||||