Exception: DiscordRDA::ScalableRestClient::RateLimitedError

Inherits:
APIError
  • Object
show all
Defined in:
lib/discord_rda/connection/scalable_rest_client.rb

Instance Attribute Summary collapse

Attributes inherited from APIError

#data, #status

Instance Method Summary collapse

Constructor Details

#initialize(status, data, retry_after: nil) ⇒ RateLimitedError

Returns a new instance of RateLimitedError.



518
519
520
521
# File 'lib/discord_rda/connection/scalable_rest_client.rb', line 518

def initialize(status, data, retry_after: nil)
  super(status, data)
  @retry_after = retry_after || data['retry_after'] || 1.0
end

Instance Attribute Details

#retry_afterObject (readonly)

Returns the value of attribute retry_after.



516
517
518
# File 'lib/discord_rda/connection/scalable_rest_client.rb', line 516

def retry_after
  @retry_after
end