Liking cljdoc? Tell your friends :D

discord.http

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

add-reactionclj

(add-reaction auth channel message emoji)
source

banclj

(ban auth guild user)
source

build-channelclj

(build-channel channel-map)
source

build-serverclj

(build-server server-map)
source

build-userclj

(build-user user-map)
source

channel-type-mapclj

source

clear-reactionsclj

(clear-reactions auth channel message)
source

create-channelclj

(create-channel auth guild channel-name & {:keys [type bitrate] :as params})
source

create-dm-channelclj

(create-dm-channel auth user)
source

create-serverclj

(create-server auth server-name icon region)
source

delete-channelclj

(delete-channel auth channel)
source

delete-messageclj

(delete-message auth channel message)
source

delete-messagesclj

(delete-messages auth channel messages)
source

delete-serverclj

(delete-server auth guild)
source

discord-requestclj

(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:

  • 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.

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

discord-urlclj

source

edit-channelclj

(edit-channel auth channel & {:keys [name topic bitrate position] :as params})
source

edit-memberclj

(edit-member auth
             guild
             user
             &
             {:keys [nick roles mute deaf channel_id] :as params})
source

edit-messageclj

(edit-message auth channel message content & {:keys [embed]})
source

edit-profileclj

(edit-profile auth & {:keys [username avatar] :as params})
source

endpoint-mappingclj

source

estimate-prune-membersclj

(estimate-prune-members auth guild days)
source

find-channelclj

(find-channel auth guild channel-name)
source

find-memberclj

(find-member auth guild member-name)
source

find-serverclj

(find-server auth server-name)
source

get-bot-gatewayclj

(get-bot-gateway auth)
source

get-channelclj

(get-channel auth channel)
source

get-current-userclj

(get-current-user auth)
source

get-endpointclj

(get-endpoint endpoint-key endpoint-args)
source

get-gatewayclj

(get-gateway auth)
source

get-guildclj

(get-guild auth guild)
source

get-guild-channelsclj

(get-guild-channels auth guild)
source

get-guild-memberclj

(get-guild-member auth guild user)
source

get-memberclj

(get-member auth guild user)
source

get-messageclj

(get-message auth channel message)
source

get-rolesclj

(get-roles auth guild)
source

get-serversclj

(get-servers auth)
source

get-text-channelsclj

(get-text-channels auth guild)
source

get-voice-channelsclj

(get-voice-channels auth guild)
source

kickclj

(kick auth guild user)
source

list-membersclj

(list-members auth guild & {:keys [limit after] :as params})
source

logs-fromclj

(logs-from auth channel limit & {:keys [before after around] :as params})
source

modify-serverclj

(modify-server auth guild & {:keys [name region] :as params})
source

move-channelclj

(move-channel auth channel new-position)
source

pin-messageclj

(pin-message auth channel message)
source

pins-fromclj

(pins-from auth channel)
source

prune-membersclj

(prune-members auth guild days)
source

rate-limit-poolclj

source

reaction-usersclj

(reaction-users auth channel message emoji & {:keys [limit after] :as params})
source

remove-reactionclj

(remove-reaction auth channel message emoji user)
source

send-messageclj

(send-message auth channel content & {:keys [tts embed]})
source

send-typingclj

(send-typing auth channel)
source

unbanclj

(unban auth guild user)
source

unpin-messageclj

(unpin-message auth channel message)
source

update-nicknameclj

(update-nickname auth guild nickname)
source

user-agentclj

source

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

× close