using Remora.Rest.Core; namespace TeamOctolings.Octobot.Extensions; public static class SnowflakeExtensions { /// /// Checks whether this Snowflake has any value set. /// /// The Snowflake to check. /// true if the Snowflake has no value set or it's set to 0, false otherwise. public static bool Empty(this Snowflake snowflake) { return snowflake.Value is 0; } /// /// Checks whether this snowflake is empty (see ) or it's equal to /// /// /// The Snowflake to check for emptiness /// The Snowflake to check for equality with . /// /// true if is empty or is equal to , false /// otherwise. /// /// public static bool EmptyOrEqualTo(this Snowflake snowflake, Snowflake anotherSnowflake) { return snowflake.Empty() || snowflake == anotherSnowflake; } }