EDA.Event.RateLimited (EDA v0.3.0)

Copy Markdown View Source

Dispatched when the app hits a gateway rate limit for an opcode.

Discord currently only documents meta for opcode 8 (Request Guild Members), whose metadata carries the guild_id and the request nonce. Both are flattened here for convenience; meta keeps the raw map.

Summary

Functions

Converts a raw Discord payload into this event struct.

Types

t()

@type t() :: %EDA.Event.RateLimited{
  guild_id: String.t() | nil,
  meta: map() | nil,
  nonce: String.t() | nil,
  opcode: integer() | nil,
  retry_after: float() | nil
}

Functions

from_raw(raw)

@spec from_raw(map()) :: t()

Converts a raw Discord payload into this event struct.