feature: support X-RateLimit-Reset-After (#1372)
* feature: support X-RateLimit-Reset-After
Users may now optionally disable using the system clock to calculate
the ratelimit duration. This may be overrided globally, via
DiscordConfig, or per RequestOptions.
This change has been built and tested via the integrated test suite,
but has not been tested in the real world. Please verify this does not
break any of the edge-case ratelimits.
* patch: wire new config properties to ApiClient
* patch: update Reset-After parsing precision
This patch applies the changes made to parsing precision in 606dac3.
This commit is contained in:
@@ -81,7 +81,8 @@ namespace Discord.WebSocket
|
||||
: base(config, client) => BaseConfig = config;
|
||||
private static DiscordSocketApiClient CreateApiClient(DiscordSocketConfig config)
|
||||
=> new DiscordSocketApiClient(config.RestClientProvider, config.WebSocketProvider, DiscordRestConfig.UserAgent,
|
||||
rateLimitPrecision: config.RateLimitPrecision);
|
||||
rateLimitPrecision: config.RateLimitPrecision,
|
||||
useSystemClock: config.UseSystemClock);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a Discord application information for the logged-in user.
|
||||
|
||||
Reference in New Issue
Block a user