Skip to content

Commit

Permalink
Merge pull request #26 from Hampo/patch-1
Browse files Browse the repository at this point in the history
Improve `IsSubscriber` and add `IsStaff`
  • Loading branch information
Syzuna authored Apr 15, 2024
2 parents 18d4763 + 9c306fe commit 06c76da
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public sealed class ChannelChatMessage
/// <summary>
/// Returns true if viewer is a subscriber
/// </summary>
public bool IsSubscriber => Badges.Any(x => x.SetId.Equals("subscriber", StringComparison.OrdinalIgnoreCase));
public bool IsSubscriber => Badges.Any(x => x.SetId.Equals("subscriber", StringComparison.OrdinalIgnoreCase) || x.SetId.Equals("founder", StringComparison.OrdinalIgnoreCase));
/// <summary>
/// Returns true if viewer is a moderator
/// </summary>
Expand All @@ -83,5 +83,9 @@ public sealed class ChannelChatMessage
/// Returns true if viewer is a vip
/// </summary>
public bool IsVip => Badges.Any(x => x.SetId.Equals("vip", StringComparison.OrdinalIgnoreCase));
/// <summary>
/// Returns true if viewer is a staff member
/// </summary>
public bool IsStaff => Badges.Any(x => x.SetId.Equals("staff", StringComparison.OrdinalIgnoreCase) || x.SetId.Equals("admin", StringComparison.OrdinalIgnoreCase));
}
}

0 comments on commit 06c76da

Please sign in to comment.