Functions and Records used to interact directly with the Discord API. Any actions performed on Discord eventually boil down to some form of API request. The API endpoints are represented as human-readable keywords and implemented using the discord-request helper function. Exposed externally are functions such as get-channel, which perform the API requests and handle the transformation of the response into a more usable Clojure record.
Functions and Records used to interact directly with the Discord API. Any actions performed on Discord eventually boil down to some form of API request. The API endpoints are represented as human-readable keywords and implemented using the discord-request helper function. Exposed externally are functions such as get-channel, which perform the API requests and handle the transformation of the response into a more usable Clojure record.
(add-reaction auth channel message emoji)
(ban auth guild user)
(build-channel channel-map)
(build-server server-map)
(build-user user-map)
(clear-reactions auth channel message)
(create-channel auth guild channel-name & {:keys [type bitrate] :as params})
(create-dm-channel auth user)
(create-server auth server-name icon region)
(delete-channel auth channel)
(delete-message auth channel message)
(delete-messages auth channel messages)
(delete-server auth guild)
(discord-request
endpoint-key
auth
&
{:keys [json params args constructor] :or {constructor identity} :as opts})
General wrapper function for sending a request to one of the pre-defined Discord API endpoints. This function calls other helper functions to handle the following:
Arguments: endpoint-key: A keyword that maps to a defined endpoint in endpoint-mapping auth: Something that implements the Authenticated protocol to auth with the Discord APIs
Options are passed :key val ... Supported options:
:json map - An optional JSON body to pass along with post/put/patch/delete request :params map - Optional query parameters to pass along with a get request :args list - In order (format) arguments to correctly format the endpoint from endpoint-mapping :constructor f - A function which is mapped over API responses to create appropriate Records.
General wrapper function for sending a request to one of the pre-defined Discord API endpoints. This function calls other helper functions to handle the following: - Retrieving the API endpoint to call - Formatting the request - Sending the API call - Deferred retries of API calls in the event of a 429 Rate Limit response Arguments: endpoint-key: A keyword that maps to a defined endpoint in endpoint-mapping auth: Something that implements the Authenticated protocol to auth with the Discord APIs Options are passed :key val ... Supported options: :json map - An optional JSON body to pass along with post/put/patch/delete request :params map - Optional query parameters to pass along with a get request :args list - In order (format) arguments to correctly format the endpoint from endpoint-mapping :constructor f - A function which is mapped over API responses to create appropriate Records.
(edit-channel auth channel & {:keys [name topic bitrate position] :as params})
(edit-member auth
guild
user
&
{:keys [nick roles mute deaf channel_id] :as params})
(edit-message auth channel message content & {:keys [embed]})
(edit-profile auth & {:keys [username avatar] :as params})
(estimate-prune-members auth guild days)
(find-channel auth guild channel-name)
(find-member auth guild member-name)
(find-server auth server-name)
(get-bot-gateway auth)
(get-channel auth channel)
(get-current-user auth)
(get-endpoint endpoint-key endpoint-args)
(get-gateway auth)
(get-guild auth guild)
(get-guild-channels auth guild)
(get-guild-member auth guild user)
(get-member auth guild user)
(get-message auth channel message)
(get-roles auth guild)
(get-servers auth)
(get-text-channels auth guild)
(get-voice-channels auth guild)
(kick auth guild user)
(list-members auth guild & {:keys [limit after] :as params})
(logs-from auth channel limit & {:keys [before after around] :as params})
(modify-server auth guild & {:keys [name region] :as params})
(move-channel auth channel new-position)
(pin-message auth channel message)
(pins-from auth channel)
(prune-members auth guild days)
(reaction-users auth channel message emoji & {:keys [limit after] :as params})
(remove-reaction auth channel message emoji user)
(send-message auth channel content & {:keys [tts embed]})
(send-typing auth channel)
(unban auth guild user)
(unpin-message auth channel message)
(update-nickname auth guild nickname)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close