Turns out it was due to NoResponse being the first value in the enum so it was assigned value 0

This commit is contained in:
barelyprofessional
2025-09-12 13:58:58 -05:00
parent 07949e1a7d
commit 2b243bea57

View File

@@ -34,10 +34,11 @@ public class RateLimitOptionsModel
/// Maximum number of permitted invocations within the window before triggering the rate limit /// Maximum number of permitted invocations within the window before triggering the rate limit
/// </summary> /// </summary>
public required int MaxInvocations { get; set; } public required int MaxInvocations { get; set; }
/// <summary> /// <summary>
/// Optional set of flags to configure the behavior of the rate limiter /// Optional set of flags to configure the behavior of the rate limiter
/// </summary> /// </summary>
public RateLimitFlags Flags { get; set; } public RateLimitFlags Flags { get; set; } = RateLimitFlags.None;
} }
public class IsRateLimitedModel public class IsRateLimitedModel
@@ -56,6 +57,10 @@ public class IsRateLimitedModel
[Flags] [Flags]
public enum RateLimitFlags public enum RateLimitFlags
{ {
/// <summary>
/// Placeholder for the default value
/// </summary>
None,
/// <summary> /// <summary>
/// Silently ignore a user when they trigger a rate limit /// Silently ignore a user when they trigger a rate limit
/// </summary> /// </summary>