DiscordRateLimiterSpec

public protocol DiscordRateLimiterSpec

A DiscordRateLimiterSpec is in charge of making sure we don’t flood Discord with requests. It keeps a dictionary of DiscordRateLimitKeys and DiscordRateLimits. All requests to the REST api should be routed through a DiscordRateLimiterSpec.

  • The queue that request responses are called on.

    Declaration

    Swift

    var callbackQueue: DispatchQueue
  • Whether or not this rate limiter should immediately callback on rate limits.

    Declaration

    Swift

    var failFast: Bool