Liking cljdoc? Tell your friends :D

slash.core

Core namespace.

Core namespace.
raw docstring

interaction-typesclj

A map of interaction type code -> interaction type name keyword.

See https://discord.com/developers/docs/interactions/slash-commands#interaction-object-interaction-request-type
sourceraw docstring

route-interactionclj

(route-interaction handlers {:keys [type] :as interaction})

Takes a handler map and an interaction and routes the interaction to the correct handler.

The handler map should map each interaction type to one handler function. The handler functions take the interaction as a parameter. See slash.gateway/gateway-defaults and slash.webhook/webhook-defaults for default handler maps.

The interaction object passed to this function must be given as a Clojure map with keywords as keys.

Takes a handler map and an interaction and routes the interaction to the correct handler.

The handler map should map each interaction type to one handler function.
The handler functions take the interaction as a parameter.
See [[slash.gateway/gateway-defaults]] and [[slash.webhook/webhook-defaults]] for default handler maps.

The interaction object passed to this function must be given as a Clojure map with keywords as keys.
sourceraw docstring

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

× close