* support X-RateLimit-Reset sending integer or float values This changes the way that the X-RateLimit-Request header is parsed, so that it will work with both integer seconds and float values with seconds and milliseconds * Add RateLimitPrecision enum, set X-RateLimit-Precision Adds the RateLimitPrecision enum, with Second and Millisecond values. (Do we want to use an extension method to convert it into a string, or is ToString().ToLower() fine?) Adds RateLimitPrecision as a parameter to DiscordRestApiClient, and to DiscordConfig so that it can set the X-RateLimit-Precision header.
19 lines
482 B
C#
19 lines
482 B
C#
namespace Discord
|
|
{
|
|
/// <summary>
|
|
/// Specifies the level of precision to request in the rate limit
|
|
/// response header.
|
|
/// </summary>
|
|
public enum RateLimitPrecision
|
|
{
|
|
/// <summary>
|
|
/// Specifies precision rounded up to the nearest whole second
|
|
/// </summary>
|
|
Second,
|
|
/// <summary>
|
|
/// Specifies precision rounded to the nearest millisecond.
|
|
/// </summary>
|
|
Millisecond
|
|
}
|
|
}
|