Nostrum.Struct.VoiceWSState (Nostrum v0.5.0-rc1) View Source

Struct representing the current Voice WS state.

Link to this section Summary

Types

PID of the :gun worker connected to the websocket

PID of the connection process

Gateway URL

The guild id that this voice websocket state applies to

Whether or not the last hearbeat sent was ACK'd

Interval at which heartbeats are sent

Time ref for the heartbeat

Whether the session has been identified

The time the last heartbeat was acknowledged, will be nil if a heartbeat hasn't been ACK'd yet

The time the last heartbeat was sent, if a heartbeat hasn't been sent it will be the time the websocket process was started

The session id

Stream reference for :gun

t()

The session token

Link to this section Types

Specs

conn() :: pid()

PID of the :gun worker connected to the websocket

Specs

conn_pid() :: pid()

PID of the connection process

Specs

gateway() :: String.t()

Gateway URL

Specs

guild_id() :: Nostrum.Struct.Guild.id()

The guild id that this voice websocket state applies to

Specs

heartbeat_ack() :: boolean()

Whether or not the last hearbeat sent was ACK'd

Specs

heartbeat_interval() :: integer() | nil

Interval at which heartbeats are sent

Specs

heartbeat_ref() :: :timer.tref() | nil

Time ref for the heartbeat

Specs

identified() :: boolean()

Whether the session has been identified

Specs

last_heartbeat_ack() :: DateTime.t() | nil

The time the last heartbeat was acknowledged, will be nil if a heartbeat hasn't been ACK'd yet

Specs

last_heartbeat_send() :: DateTime.t()

The time the last heartbeat was sent, if a heartbeat hasn't been sent it will be the time the websocket process was started

Specs

session() :: String.t()

The session id

Specs

stream() :: :gun.stream_ref()

Stream reference for :gun

Specs

t() :: %Nostrum.Struct.VoiceWSState{
  conn: conn(),
  conn_pid: conn_pid(),
  gateway: gateway(),
  guild_id: guild_id(),
  heartbeat_ack: heartbeat_ack(),
  heartbeat_interval: heartbeat_interval(),
  heartbeat_ref: heartbeat_ref(),
  identified: identified(),
  last_heartbeat_ack: last_heartbeat_ack(),
  last_heartbeat_send: last_heartbeat_send(),
  session: session(),
  stream: stream(),
  token: token()
}

Specs

token() :: String.t()

The session token