Liking cljdoc? Tell your friends :D

discord.gateway

This implements the Discord Gateway protocol

This implements the Discord Gateway protocol
raw docstring

build-gatewayclj

(build-gateway gateway-response)

build-messageclj

(build-message message-map gateway)

Builds a Message record based on the incoming Message from the Discord Gateway. The Gateway record that received the message is passed as the second argument to this function.

Builds a Message record based on the incoming Message from the Discord Gateway. The Gateway
record that received the message is passed as the second argument to this function.
raw docstring

connect-to-gatewayclj

(connect-to-gateway auth receive-channel)

Attempts to connect to the discord Gateway using some supplied authentication source

Arguments: auth : Authenticated -- An implementation of the Authenticated protcol to authenticate with the Discord APIs. receive-channel : Channel -- An asynchronous channel (core.async) that messages from the server will be pushed onto.

Attempts to connect to the discord Gateway using some supplied authentication source

Arguments:
auth : Authenticated -- An implementation of the Authenticated protcol to authenticate with the
   Discord APIs.
receive-channel : Channel -- An asynchronous channel (core.async) that messages from the server
   will be pushed onto.
raw docstring

format-gateway-messageclj

(format-gateway-message op data)

Builds the correct map structure with the correct op-codes. If the op-code supplied is not found, an (ex-info) Exception will be raised

Builds the correct map structure with the correct op-codes. If the op-code supplied is not found,
an (ex-info) Exception will be raised
raw docstring

Gatewaycljprotocol

send-messageclj

(send-message this message)

handle-gateway-control-eventcljmultimethod

Handling server control events. Control events are control messages sent by the Gateway to a connected client to inform the client about disconnects, reconnects, rate limits, etc.

Handling server control events. Control events are control messages sent by the Gateway to a
connected client to inform the client about disconnects, reconnects, rate limits, etc.
raw docstring

handle-gateway-messagecljmultimethod

Handling messages sent by the Discord API gateway

These are messages that are received from the gateway and include text messages sent by users/clients as well as various control messages sent by the Discord gateway.

Handling messages sent by the Discord API gateway

These are messages that are received from the gateway and include text messages sent by
users/clients as well as various control messages sent by the Discord gateway.
raw docstring

message-code->nameclj


message-name->codeclj


reconnect-gatewayclj

(reconnect-gateway gateway)

In the event that we are disconnected from the Discord gateway, we will attempt to reconnect by establishing a new websocket connection with the gateway. After this is complete, we will update our current socket reference and then send a 'resume' message to the Discord gateway that we have resumed our session.

In the event that we are disconnected from the Discord gateway, we will attempt to reconnect by
establishing a new websocket connection with the gateway. After this is complete, we will update
our current socket reference and then send a 'resume' message to the Discord gateway that we have
resumed our session.
raw docstring

send-heartbeatclj

(send-heartbeat gateway seq-num)

send-identifyclj

(send-identify gateway)

Sends an identification message to the supplied Gateway. This tells the Discord gateway information about ourselves.

Sends an identification message to the supplied Gateway. This tells the Discord gateway
information about ourselves.
raw docstring

send-resumeclj

(send-resume gateway)

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close