Liking cljdoc? Tell your friends :D

discljord.messaging.impl

Implementation namespace for discljord.messaging.

Implementation namespace for `discljord.messaging`.
raw docstring

auth-headersclj

(auth-headers token user-agent)
source

defdispatchcljmacro

(defdispatch endpoint-name
             [major-var & params]
             [& opts]
             opts-sym
             method
             status-sym
             body-sym
             url-str
             method-params
             promise-val)
sourceraw docstring

derefable-promise-chanclj

(derefable-promise-chan)
(derefable-promise-chan xform)
(derefable-promise-chan xform ex-handler)

Creates an implementation of [[clojure.lang.IDeref]] which is also a core.async chan.

Creates an implementation of [[clojure.lang.IDeref]] which is also a core.async chan.
sourceraw docstring

dispatch-httpcljmultimethod

Takes a process and endpoint, and dispatches an http request. Must return the response object from the call to allow the runtime to update the rate limit.

Takes a process and endpoint, and dispatches an http request.
Must return the response object from the call to allow the runtime
to update the rate limit.
sourceraw docstring

make-request!clj

(make-request! token rate-limits global-limit endpoint event-data bucket)

Makes a request after waiting for the rate limit, retrying if necessary.

Makes a request after waiting for the rate limit, retrying if necessary.
sourceraw docstring

rate-limited?clj

(rate-limited? rate-limit)

Returns the number of millis until the limit expires, or nil if not limited

Returns the number of millis until the limit expires, or nil if not limited
sourceraw docstring

start!clj

(start! token)

Takes a token for a bot and returns a channel to communicate with the message sending process.

Takes a token for a bot and returns a channel to communicate with the
message sending process.
sourceraw docstring

step-agentclj

(step-agent process [endpoint & event-data :as event])

Takes a process and an event, and runs the request, respecting rate limits

Takes a process and an event, and runs the request, respecting rate limits
sourceraw docstring

stop!clj

(stop! channel)

Takes the channel returned from start! and stops the messaging process.

Takes the channel returned from start! and stops the messaging process.
sourceraw docstring

update-rate-limitclj

(update-rate-limit rate-limit headers)

Takes a rate-limit and a map of headers and returns an updated rate-limit.

If rate limit headers are included in the map, then the rate limit is updated to them, otherwise the existing rate limit is used, but the remaining limit is decremented.

Takes a rate-limit and a map of headers and returns an updated rate-limit.

If rate limit headers are included in the map, then the rate limit is updated
to them, otherwise the existing rate limit is used, but the remaining limit is
decremented.
sourceraw docstring

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

× close