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)
source

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.
sourceraw 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.
sourceraw 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
sourceraw docstring

Gatewaycljprotocol

send-messageclj

(send-message this message)
source

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.
sourceraw 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.
sourceraw docstring

message-code->nameclj

source

message-name->codeclj

source

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.
sourceraw docstring

send-heartbeatclj

(send-heartbeat gateway seq-num)
source

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.
sourceraw docstring

send-resumeclj

(send-resume gateway)
source

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

× close