Contains functions for communicating with Discord, sending messages, and recieving data.
Contains functions for communicating with Discord, sending messages, and recieving data.
(add-channel-pinned-message! conn
channel-id
message-id
&
{:as opts :keys [user-agent]})
Pins the given message to the channel. Returns a promise containing a boolean of if it succeeded.
Pins the given message to the channel. Returns a promise containing a boolean of if it succeeded.
(add-guild-member! conn
guild-id
user-id
access-token
&
{:as opts :keys [nick roles mute deaf user-agent]})
NOT INTENDED FOR BOT USE. Adds a user to a guild. Requires an access token. Returns a promise containing the keyword :already-member if the user is already a member, or the guild member object.
NOT INTENDED FOR BOT USE. Adds a user to a guild. Requires an access token. Returns a promise containing the keyword :already-member if the user is already a member, or the guild member object.
(add-guild-member-role! conn
guild-id
user-id
role-id
&
{:as opts :keys [user-agent]})
Adds the given role to the user. Returns a promise containing a boolean of if it succeeded.
Adds the given role to the user. Returns a promise containing a boolean of if it succeeded.
(begin-guild-prune! conn
guild-id
days
compute-prune-count
&
{:as opts :keys [user-agent]})
Starts a guild prune. Returns a promise containing nil if compute-prune-count is false, otherwise the number of users to be prouned.
Starts a guild prune. Returns a promise containing nil if compute-prune-count is false, otherwise the number of users to be prouned.
(bulk-delete-messages! conn channel-id messages & {:as opts :keys [user-agent]})
Deletes all the messages whose id's are in the passed vector. Returns a promise containing a boolean of if it succeeded.
Deletes all the messages whose id's are in the passed vector. Returns a promise containing a boolean of if it succeeded.
(create-channel-invite! conn
channel-id
&
{:as opts
:keys [max-age max-uses temporary unique user-agent]})
Returns a promise containing a new invite object.
Returns a promise containing a new invite object.
(create-dm! conn user-id & {:as opts :keys [user-agent]})
Returns a promise containing a DM channel object with the given user.
Returns a promise containing a DM channel object with the given user.
(create-group-dm! conn access-tokens nicks & {:as opts :keys [user-agent]})
NOT INTENDED FOR BOT USE. Returns a promise containing a DM channel object.
NOT INTENDED FOR BOT USE. Returns a promise containing a DM channel object.
(create-guild! conn
name
region
icon
verification-level
default-message-notifications
explicit-content-filter
role-objects
channels
&
{:as opts :keys [user-agent]})
Returns a promise containing the created guild object.
Returns a promise containing the created guild object.
(create-guild-ban! conn
guild-id
user-id
&
{:as opts :keys [delete-message-days reason user-agent]})
Bans a user. Returns a promise containing a boolean of if it succeeded.
Bans a user. Returns a promise containing a boolean of if it succeeded.
(create-guild-channel! conn
guild-id
name
&
{:as opts
:keys [type topic bitrate user-limit rate-limit-per-user
position permission-overwrites parent-id nsfw
user-agent]})
Returns a promise containing the new channel object.
Returns a promise containing the new channel object.
(create-guild-emoji! conn
guild-id
name
image
roles
&
{:as opts :keys [user-agent]})
Creates a new guild emoji. Returns a promise containing the new emoji object.
Creates a new guild emoji. Returns a promise containing the new emoji object.
(create-guild-integration! conn
guild-id
type
id
&
{:as opts :keys [user-agent]})
Creates a new integration in the guild. Returns a promise containing a boolean of if it succeeded.
Creates a new integration in the guild. Returns a promise containing a boolean of if it succeeded.
(create-guild-role!
conn
guild-id
&
{:as opts :keys [name permissions color hoist mentionable user-agent]})
Returns a promise containing the created role.
Returns a promise containing the created role.
(create-message! conn
channel-id
&
{:as opts :keys [content tts nonce embed file user-agent]})
Sends a message on the channel. Returns a promise containing the message object.
Currently does not support uploading files.
Sends a message on the channel. Returns a promise containing the message object. Currently does not support uploading files.
(create-reaction! conn
channel-id
message-id
emoji
&
{:as opts :keys [user-agent]})
Creates a new reaction on the message with the given emoji (either unicode or the id of a custom emoji). Returns a promise containing a boolean, telling you if it succeeded.
Creates a new reaction on the message with the given emoji (either unicode or the id of a custom emoji). Returns a promise containing a boolean, telling you if it succeeded.
(create-webhook! conn channel-id name & {:as opts :keys [avatar user-agent]})
Returns a promise containing the new webhook object.
Returns a promise containing the new webhook object.
(defendpoint endpoint-name major-var-type doc-str params opts)
Creates a new non-blocking function for a discord endpoint. endpoint-name
must end with an '!'
Creates a new non-blocking function for a discord endpoint. `endpoint-name` must end with an '!'
(delete-all-reactions! conn
channel-id
message-id
&
{:as opts :keys [user-agent]})
Deletes all reactions on a message. Returns a promise containing a boolean of if it succeeded.
Deletes all reactions on a message. Returns a promise containing a boolean of if it succeeded.
(delete-channel! conn channel-id & {:as opts :keys [user-agent user-agent]})
Deletes a channel. Returns a promise containing the deleted channel object.
Deletes a channel. Returns a promise containing the deleted channel object.
(delete-channel-permission! conn
channel-id
overwrite-id
&
{:as opts :keys [user-agent]})
Deletes a permission override in a channel. Returns a promise containing a boolean of if it succeeded.
Deletes a permission override in a channel. Returns a promise containing a boolean of if it succeeded.
(delete-guild! conn guild-id & {:as opts :keys [user-agent]})
Deletes a guild if the bot is the owner. Returns a promise containing a boolean of if it succeeded.
Deletes a guild if the bot is the owner. Returns a promise containing a boolean of if it succeeded.
(delete-guild-emoji! conn guild-id emoji & {:as opts :keys [user-agent]})
Deletes an emoji from the guild. Returns a promise containing a boolean of if it succeeded.
Deletes an emoji from the guild. Returns a promise containing a boolean of if it succeeded.
(delete-guild-integration! conn
guild-id
integration-id
&
{:as opts :keys [user-agent]})
Deletes a guild integration. Returns a promise containing a boolean of if it succeeded.
Deletes a guild integration. Returns a promise containing a boolean of if it succeeded.
(delete-guild-role! conn guild-id role-id & {:as opts :keys [user-agent]})
Deletes a guild role. Returns a promise containing a boolean of if it succeeded.
Deletes a guild role. Returns a promise containing a boolean of if it succeeded.
(delete-invite! conn invite-code & {:as opts :keys [user-agent]})
Deletes the invite. Returns a promise containing the deleted invite.
Deletes the invite. Returns a promise containing the deleted invite.
(delete-message! conn channel-id message-id & {:as opts :keys [user-agent]})
Deletes the given message. Returns a promise containing a boolean of if it succeeded.
Deletes the given message. Returns a promise containing a boolean of if it succeeded.
(delete-own-reaction! conn
channel-id
message-id
emoji
&
{:as opts :keys [user-agent]})
Deletes your reaction on the messasge with the given emoji (either unicode or the id of a custom emoji). Returns a promise containing a boolean, telling you if it succeeded.
Deletes your reaction on the messasge with the given emoji (either unicode or the id of a custom emoji). Returns a promise containing a boolean, telling you if it succeeded.
(delete-pinned-channel-message! conn
channel-id
message-id
&
{:as opts :keys [user-agent]})
Removes a message from the pinned list in the channel. Returns a promise containing a boolean of if it succeeded.
Removes a message from the pinned list in the channel. Returns a promise containing a boolean of if it succeeded.
(delete-user-reaction! conn
channel-id
message-id
emoji
user-id
&
{:as opts :keys [user-agent]})
Deletes a given user's reaction to a message with the given emoji (either unicode or the id of a custom emoji). Returns a promise containing a boolean, telling you if it succeeded.
Deletes a given user's reaction to a message with the given emoji (either unicode or the id of a custom emoji). Returns a promise containing a boolean, telling you if it succeeded.
(delete-webhook! conn webhook-id & {:as opts :keys [user-agent]})
Deletes the webhook. Returns a promise containing a boolean of if it succeeded.
Deletes the webhook. Returns a promise containing a boolean of if it succeeded.
(delete-webhook-with-token! conn
webhook-id
webhook-token
&
{:as opts :keys [user-agent]})
Deletes the webhook, but does not require authentication. Returns a promise containing a boolean of if it succeeded.
Deletes the webhook, but does not require authentication. Returns a promise containing a boolean of if it succeeded.
(edit-channel-permissions! conn
channel-id
overwrite-id
allow
deny
type
&
{:as opts :keys [user-agent]})
Edits the channel's permissions of either a user or role. Returns a promise containing a boolean of if it succeeded.
Edits the channel's permissions of either a user or role. Returns a promise containing a boolean of if it succeeded.
(edit-message! conn
channel-id
message-id
&
{:as opts :keys [content embed user-agent]})
Edits the given message with the new content or embed. Returns a promise containing the new message.
Edits the given message with the new content or embed. Returns a promise containing the new message.
(execute-webhook! conn
webhook-id
webhook-token
content
file
embeds
&
{:as opts :keys [wait username avatar-url tts user-agent]})
Executes the given webhook. Returns a promise which always contains nil.
Executes the given webhook. Returns a promise which always contains nil.
(get-channel! conn channel-id & {:as opts :keys [user-agent]})
Returns a promise containing a channel object.
Returns a promise containing a channel object.
(get-channel-invites! conn channel-id & {:as opts :keys [user-agent]})
Returns a promise containing a list of invite objects with invite metadata.
Returns a promise containing a list of invite objects with invite metadata.
(get-channel-message! conn
channel-id
message-id
&
{:as opts :keys [user-agent]})
Returns a promise containing the message object.
Returns a promise containing the message object.
(get-channel-messages! conn
channel-id
&
{:as opts :keys [around before after limit user-agent]})
Returns a promise containing a vector of message objects.
Returns a promise containing a vector of message objects.
(get-channel-webhooks! conn channel-id & {:as opts :keys [user-agent]})
Returns a promise containing a vector of webhook objects.
Returns a promise containing a vector of webhook objects.
(get-current-user! conn & {:as opts :keys [user-agent]})
Returns a promise containing the user object for the current user.
Returns a promise containing the user object for the current user.
(get-current-user-guilds! conn
&
{:as opts :keys [before after limit user-agent]})
Returns a promise containing the current user's guilds. Pagination will be required if the bot is in over 100 guilds.
Returns a promise containing the current user's guilds. Pagination will be required if the bot is in over 100 guilds.
(get-guild! conn guild-id & {:as opts :keys [user-agent]})
Returns a promise containing the guild object.
Returns a promise containing the guild object.
(get-guild-audit-log! conn guild-id & {:as opts :keys [user-agent]})
Returns a promise containing an audit log object for the guild.
Returns a promise containing an audit log object for the guild.
(get-guild-ban! conn guild-id user-id & {:as opts :keys [user-agent]})
Returns a promise containing a ban object for the given user.
Returns a promise containing a ban object for the given user.
(get-guild-bans! conn guild-id & {:as opts :keys [user-agent]})
Returns a promise containing a vector of ban objects.
Returns a promise containing a vector of ban objects.
(get-guild-channels! conn guild-id & {:as opts :keys [user-agent]})
Returns a promise containing a vector of channel objects.
Returns a promise containing a vector of channel objects.
(get-guild-embed! conn guild-id & {:as opts :keys [user-agent]})
Returns a promise containing the guild embed object.
Returns a promise containing the guild embed object.
(get-guild-emoji! conn guild-id emoji & {:as opts :keys [user-agent]})
Returns a promise containing the given guild emoji object.
Returns a promise containing the given guild emoji object.
(get-guild-integrations! conn guild-id & {:as opts :keys [user-agent]})
Returns a promise containing a vector of guild integration objects.
Returns a promise containing a vector of guild integration objects.
(get-guild-invites! conn guild-id & {:as opts :keys [user-agent]})
Returns a promise containing a vector of guild invite objects.
Returns a promise containing a vector of guild invite objects.
(get-guild-member! conn guild-id user-id & {:as opts :keys [user-agent]})
Returns a promise containing the guild member object.
Returns a promise containing the guild member object.
(get-guild-prune-count! conn guild-id & {:as opts :keys [days user-agent]})
Returns a promise containing the number of users to be pruned.
Returns a promise containing the number of users to be pruned.
(get-guild-roles! conn guild-id & {:as opts :keys [user-agent]})
Returns a promise containing a vector of role objects.
Returns a promise containing a vector of role objects.
(get-guild-vanity-url! conn guild-id & {:as opts :keys [user-agent]})
Returns a promise containing a partial invite object if the guild supports it, otherwise nil.
Returns a promise containing a partial invite object if the guild supports it, otherwise nil.
(get-guild-voice-regions! conn guild-id & {:as opts :keys [user-agent]})
Returns a promise containing a vector of voice region objects.
Returns a promise containing a vector of voice region objects.
(get-guild-webhooks! conn guild-id & {:as opts :keys [user-agent]})
Returns a promise containing a vector of webhook objects.
Returns a promise containing a vector of webhook objects.
(get-guild-widget-image! conn guild-id & {:as opts :keys [style user-agent]})
Returns a promise containing the guild widget image.
Returns a promise containing the guild widget image.
(get-invite! conn invite-code & {:as opts :keys [with-counts? user-agent]})
Returns a promise containing the invite.
Returns a promise containing the invite.
(get-pinned-messages! conn channel-id & {:as opts :keys [user-agent]})
Returns a promise containing a list of message objects.
Returns a promise containing a list of message objects.
(get-reactions! conn
channel-id
message-id
emoji
&
{:as opts :keys [before after limit user-agent]})
Returns a promise containing a list of all users who reacted to the message with the emoji (either unicode or the id of a custom emoji), based on the provided limits.
Returns a promise containing a list of all users who reacted to the message with the emoji (either unicode or the id of a custom emoji), based on the provided limits.
(get-user! conn user-id & {:as opts :keys [user-agent]})
Returns a promise containing the user object for the given user.
Returns a promise containing the user object for the given user.
(get-user-connections! conn & {:as opts :keys [user-agent]})
NOT INTENDED FOR BOT USE. Returns a promise containing a vector of connection objects.
NOT INTENDED FOR BOT USE. Returns a promise containing a vector of connection objects.
(get-user-dms! conn & {:as opts :keys [user-agent]})
Returns a promise containing a vector of DM channel objects.
Returns a promise containing a vector of DM channel objects.
(get-webhook! conn webhook-id & {:as opts :keys [user-agent]})
Returns a promise containing a webhook object.
Returns a promise containing a webhook object.
(get-webhook-with-token! conn
webhook-id
webhook-token
&
{:as opts :keys [user-agent]})
Returns a promise containing a webhook object, but does not require authentication.
Returns a promise containing a webhook object, but does not require authentication.
(group-dm-add-recipient! conn
channel-id
user-id
&
{:as opts :keys [access-token nick user-agent]})
NOT INTENDED FOR BOT USE. Adds a new recipient to a group DM channel. Requires an access token.
NOT INTENDED FOR BOT USE. Adds a new recipient to a group DM channel. Requires an access token.
(group-dm-remove-recipient! conn
channel-id
user-id
&
{:as opts :keys [user-agent]})
NOT INTENDED FOR BOT USE. Removes a recipient from a group DM channel. Requires an access token.
NOT INTENDED FOR BOT USE. Removes a recipient from a group DM channel. Requires an access token.
(leave-guild! conn guild-id & {:as opts :keys [user-agent]})
Current user leaves the given guild. Returns a promise containing a boolean of if it succeeded.
Current user leaves the given guild. Returns a promise containing a boolean of if it succeeded.
(list-guild-emojis! conn guild-id & {:as opts :keys [user-agent]})
Returns a promise containing a vector of guild emoji objects.
Returns a promise containing a vector of guild emoji objects.
(list-guild-members! conn guild-id & {:as opts :keys [limit after user-agent]})
Returns a promise containing a vector of the guild member objects.
Returns a promise containing a vector of the guild member objects.
(list-voice-regions! conn & {:as opts :keys [user-agent]})
Returns a promise containing a vector of voice regions.
Returns a promise containing a vector of voice regions.
(modifiy-guild-role!
conn
guild-id
role-id
&
{:as opts :keys [name permissions color hoist mentionable user-agent]})
Modifies the given role. Returns a promise containing the modified role object.
Modifies the given role. Returns a promise containing the modified role object.
(modify-channel! conn
channel-id
&
{:as opts
:keys [name position topic nsfw rate-limit-per-user bitrate
user-limit permission-overwrites parent-id
user-agent]})
Updates a channel's settings. Returns a promise containing the channel object.
Updates a channel's settings. Returns a promise containing the channel object.
(modify-current-user! conn & {:as opts :keys [username avatar user-agent]})
Modifies the current user object. Returns a promise containing the modified user object.
Modifies the current user object. Returns a promise containing the modified user object.
(modify-current-user-nick! conn guild-id nick & {:as opts :keys [user-agent]})
Modifies the username of the current user. Returns a promise containing either nil on failure or the new nickname on success.
Modifies the username of the current user. Returns a promise containing either nil on failure or the new nickname on success.
(modify-guild! conn
guild-id
&
{:as opts
:keys [name region verification-level
default-message-notifications explicit-content-filter
afk-channel-id afk-timeout icon owner-id splash
system-channel-id user-agent]})
Modifies an existing guild. Returns a promise containing the modified guild object.
Modifies an existing guild. Returns a promise containing the modified guild object.
(modify-guild-channel-positions! conn
guild-id
channels
&
{:as opts :keys [user-agent]})
Modifies an existing channel. Returns a promise containing the modified channel object.
Modifies an existing channel. Returns a promise containing the modified channel object.
(modify-guild-embed! conn guild-id embed & {:as opts :keys [user-agent]})
Modifies the guild embed object. Returns a promise containing the modified guild embed object.
Modifies the guild embed object. Returns a promise containing the modified guild embed object.
(modify-guild-emoji! conn
guild-id
emoji
name
roles
&
{:as opts :keys [user-agent]})
Modifies an existing guild emoji. Returns a promise containing the modified emoji object.
Modifies an existing guild emoji. Returns a promise containing the modified emoji object.
(modify-guild-integration! conn
guild-id
integration-id
expire-behavior
expire-grace-period
enable-emoticons
&
{:as opts :keys [user-agent]})
Modifies an existing guild integration. Returns a promise containing a boolean of if it succeeded.
Modifies an existing guild integration. Returns a promise containing a boolean of if it succeeded.
(modify-guild-member! conn
guild-id
user-id
&
{:as opts
:keys [nick roles mute deaf channel-id user-agent]})
Modifies a guild member. Returns a promise containing the modified guild member object.
Modifies a guild member. Returns a promise containing the modified guild member object.
(modify-guild-role-positions! conn
guild-id
roles
&
{:as opts :keys [user-agent]})
Modifies the position of the roles in the vector. Vector must contain at least two roles, each a map with :id and :position. Returns a promise containing a vector of the guild roles.
Modifies the position of the roles in the vector. Vector must contain at least two roles, each a map with :id and :position. Returns a promise containing a vector of the guild roles.
(modify-webhook! conn
webhook-id
&
{:as opts :keys [name avatar channel-id user-agent]})
Returns a promise containing the modified webhook object.
Returns a promise containing the modified webhook object.
(modify-webhook-with-token! conn
webhook-id
webhook-token
&
{:as opts
:keys [name avatar channel-id user-agent]})
Returns a promise containing the modified webhook object, but does not require authentication.
Returns a promise containing the modified webhook object, but does not require authentication.
(remove-guild-ban! conn guild-id user-id & {:as opts :keys [user-agent]})
Unbans a user. Returns a promise containing a boolean of if it succeeded.
Unbans a user. Returns a promise containing a boolean of if it succeeded.
(remove-guild-member! conn guild-id user-id & {:as opts :keys [user-agent]})
Kicks the member from the guild. Returns a promise containing a boolean of if it succeeded.
Kicks the member from the guild. Returns a promise containing a boolean of if it succeeded.
(remove-guild-member-role! conn
guild-id
user-id
role-id
&
{:as opts :keys [user-agent]})
Removes the role from the user. Returns a promise containing a boolean of if it succeeded.
Removes the role from the user. Returns a promise containing a boolean of if it succeeded.
(start-connection! token)
Takes a token for a bot, and returns a channel which is passed to the various messaging functions.
Takes a token for a bot, and returns a channel which is passed to the various messaging functions.
(stop-connection! conn)
Takes a channel returned by start-connection! and stops the associated connection.
Takes a channel returned by start-connection! and stops the associated connection.
(sync-guild-integration! conn
guild-id
integration-id
&
{:as opts :keys [user-agent]})
Syncs the guild integration. Returns a promise containing a boolean of if it succeeded.
Syncs the guild integration. Returns a promise containing a boolean of if it succeeded.
(trigger-typing-indicator! conn channel-id & {:as opts :keys [user-agent]})
Triggers the typing indicator in the given channel (not recommended for bots unless about to send a message which takes a while to compute). Returns a promise containing a boolean of if it succeeded.
Triggers the typing indicator in the given channel (not recommended for bots unless about to send a message which takes a while to compute). Returns a promise containing a boolean of if it succeeded.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close