Concoction v0.1.0 Concoction.Gateway.Payload View Source

Struct and relevant utilities for operating on structures coming to and from the Discord Gateway.

Link to this section Summary

Types

d()

Event data in the payload.

Event name of the payload.

Opcode for the Payload.

s()

Sequence number, used for resuming sessions and heartbeats

t()

Functions

Convert the payload into ETF ready for sending to the gateway.

Link to this section Types

Specs

d() :: any()

Event data in the payload.

Specs

event_name() :: String.t() | nil

Event name of the payload.

Specs

op() :: integer()

Opcode for the Payload.

Specs

s() :: integer() | nil

Sequence number, used for resuming sessions and heartbeats

Specs

t() :: %Concoction.Gateway.Payload{d: d(), op: op(), s: s(), t: event_name()}

Link to this section Functions

Specs

to_etf(%Concoction.Gateway.Payload{d: term(), op: term(), s: term(), t: term()}) ::
  binary()

Convert the payload into ETF ready for sending to the gateway.