Contains functions for communicating with Discord, sending messages, and recieving data.
All endpoint-based functions in this namespace return promises of a sort. The
returned value is not a Clojure promise however, but is an implementation
of [[IDeref]] which also functions as a core.async
channel. This means that
in addition to [[deref]]ing the return values, they may also have a parking
take performed on them for better concurrency.
Contains functions for communicating with Discord, sending messages, and recieving data. All endpoint-based functions in this namespace return promises of a sort. The returned value is not a Clojure promise however, but is an implementation of [[IDeref]] which also functions as a `core.async` channel. This means that in addition to [[deref]]ing the return values, they may also have a parking take performed on them for better concurrency.
(add-channel-pinned-message! conn
channel-id
message-id
&
{:as opts :keys [user-agent audit-reason]})
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 audit-reason]})
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 audit-reason]})
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 audit-reason]})
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 audit-reason]})
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.
(bulk-overwrite-global-application-commands! conn
application-id
commands
&
{:as opts
:keys [user-agent audit-reason]})
Overwrites all global slash commands with the provided ones.
If a command with a given name doesn't exist, creates that command. Returns a promise containing the updated application command objects.
Overwrites all global slash commands with the provided ones. If a command with a given name doesn't exist, creates that command. Returns a promise containing the updated application command objects.
(bulk-overwrite-guild-application-commands! conn
application-id
guild-id
commands
&
{:as opts
:keys [user-agent audit-reason]})
Overwrites all guild slash commands with the provided ones.
If a command with a given name doesn't exist, creates that command. Returns a promise containing the updated application command objects.
Overwrites all guild slash commands with the provided ones. If a command with a given name doesn't exist, creates that command. Returns a promise containing the updated application command objects.
(create-channel-invite!
conn
channel-id
&
{:as opts :keys [max-age max-uses temporary unique user-agent audit-reason]})
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 audit-reason]})
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-followup-message! conn
application-id
interaction-token
&
{:as opts
:keys [content file stream embeds username avatar-url
tts allowed-mentions user-agent
audit-reason]})
Creates a followup message for the given interaction.
Returns a promise containing the message that was created.
Creates a followup message for the given interaction. Returns a promise containing the message that was created.
(create-global-application-command! conn
application-id
name
description
&
{:as opts
:keys [ms.command/options
ms.command/default_permission
user-agent audit-reason]})
Creates or updates a global slash command.
New global commands will be available in all guilds after 1 hour. Returns a promise containing the new application command object.
Creates or updates a global slash command. New global commands will be available in all guilds after 1 hour. Returns a promise containing the new application command object.
(create-group-dm! conn
access-tokens
nicks
&
{:as opts :keys [user-agent audit-reason]})
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 audit-reason]})
Returns a promise containing the created guild object.
Returns a promise containing the created guild object.
(create-guild-application-command! conn
application-id
guild-id
name
description
&
{:as opts
:keys [ms.command/options
ms.command/default_permission
user-agent audit-reason]})
Creates or updates a guild slash command.
Returns a promise containing the new application command object.
Creates or updates a guild slash command. Returns a promise containing the new application command object.
(create-guild-ban! conn
guild-id
user-id
&
{:as opts
:keys [delete-message-days reason user-agent audit-reason]})
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 [ms.channel/type topic bitrate user-limit rate-limit-per-user position
permission-overwrites parent-id nsfw user-agent audit-reason]})
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 audit-reason]})
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 audit-reason]})
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
audit-reason]})
Returns a promise containing the created role.
Returns a promise containing the created role.
(create-interaction-response! conn
interaction-id
interaction-token
type
&
{:as opts
:keys [ms.interaction-response/data file stream
user-agent audit-reason]})
Sends a response to an interaction event.
Returns a promise containing a boolean of if it succeeded.
Sends a response to an interaction event. Returns a promise containing a boolean of if it succeeded.
(create-message! conn
channel-id
&
{:as opts
:keys [content tts nonce embed file allowed-mentions
attachments stream message-reference user-agent
audit-reason]})
Sends a message on the channel. Returns a promise containing the message object.
Keyword Arguments: :user-agent changes the User-Agent header sent to Discord. :tts is a boolean, defaulting to false, which tells Discord to read your message out loud. :file is a java.io.File object specifying a file for Discord to attach to the message. :attachments is a collection of file-like objects to attach to the message. :stream is a map that has a :content of a java.io.InputStream and a :filename of the filename to attach to the message. :embed is a map specifying the embed format for the message (See Discord API)
Sends a message on the channel. Returns a promise containing the message object. Keyword Arguments: :user-agent changes the User-Agent header sent to Discord. :tts is a boolean, defaulting to false, which tells Discord to read your message out loud. :file is a java.io.File object specifying a file for Discord to attach to the message. :attachments is a collection of file-like objects to attach to the message. :stream is a map that has a :content of a java.io.InputStream and a :filename of the filename to attach to the message. :embed is a map specifying the embed format for the message (See Discord API)
(create-reaction! conn
channel-id
message-id
emoji
&
{:as opts :keys [user-agent audit-reason]})
Creates a new reaction on the message with the given emoji (either unicode or "name:id" for 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 "name:id" for 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 audit-reason]})
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
: the name of the edpoint function. must end with an '!'major-var-type
: the spec-name of the major variable used in this endpoint, if any. If there is none, nil
should be used.doc-str
: Documentation for the endpoint function.params
: Required parameters for this endpoint. If the major variable is the first parameter, it need not be included here.
The macro will attempt to find a spec for each parameter. If the parameter is an unqualified symbol, :discljord.messaging.specs/param
will be used,
otherwise the associated namespace. Aliases that do not contain dots .
can be used as namespace segments. Some examples for spec resolution:
baz
=> :discljord.messaging.specs/baz
foo.bar/baz
=> :foo.bar/baz
foo.bar/baz
and foo
is an alias for quz.foo
in the current namespace => :quz.foo.bar/baz
foo.bar/baz
and foo.bar
is an alias for lorem.ipsum
in the current namespace => :foo.bar/baz
(aliases with dots in them can't be used)opts
: Optional parameters for this endpoint. Spec resolution works exactly like for params
.Creates a new non-blocking function for a discord endpoint. - `endpoint-name`: the name of the edpoint function. must end with an '!' - `major-var-type`: the spec-name of the major variable used in this endpoint, if any. If there is none, `nil` should be used. - `doc-str`: Documentation for the endpoint function. - `params`: Required parameters for this endpoint. If the major variable is the first parameter, it need not be included here. The macro will attempt to find a spec for each parameter. If the parameter is an unqualified symbol, `:discljord.messaging.specs/param` will be used, otherwise the associated namespace. Aliases that do not contain dots `.` can be used as namespace segments. Some examples for spec resolution: - `baz` => `:discljord.messaging.specs/baz` - `foo.bar/baz` => `:foo.bar/baz` - `foo.bar/baz` and `foo` is an alias for `quz.foo` in the current namespace => `:quz.foo.bar/baz` - `foo.bar/baz` and `foo.bar` is an alias for `lorem.ipsum` in the current namespace => `:foo.bar/baz` (aliases with dots in them can't be used) - `opts`: Optional parameters for this endpoint. Spec resolution works exactly like for `params`.
(delete-all-reactions! conn
channel-id
message-id
&
{:as opts :keys [user-agent audit-reason]})
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-all-reactions-for-emoji! conn
channel-id
message-id
emoji
&
{:as opts :keys [user-agent audit-reason]})
Deletes all reactions of a particular emoji on a message. Returns a promise containing a boolean of if it succeeded.
Deletes all reactions of a particular emoji 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 audit-reason]})
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 audit-reason]})
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-followup-message! conn
interation-token
application-id
interaction-token
message-id
&
{:as opts :keys [user-agent audit-reason]})
Deletes a followup message to an interaction by its id.
Returns a promise containing a boolean of if it succeeded.
Deletes a followup message to an interaction by its id. Returns a promise containing a boolean of if it succeeded.
(delete-global-application-command! conn
application-id
command-id
&
{:as opts :keys [user-agent audit-reason]})
Deletes an existing global slash command by its id.
Returns a promise containing a boolean of if it succeeded.
Deletes an existing global slash command by its id. Returns a promise containing a boolean of if it succeeded.
(delete-guild! conn guild-id & {:as opts :keys [user-agent audit-reason]})
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-application-command! conn
application-id
guild-id
command-id
&
{:as opts :keys [user-agent audit-reason]})
Deletes an existing guild slash command by its id.
Returns a promise containing a boolean of if it succeeded.
Deletes an existing guild slash command by its id. Returns a promise containing a boolean of if it succeeded.
(delete-guild-emoji! conn
guild-id
emoji
&
{:as opts :keys [user-agent audit-reason]})
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 audit-reason]})
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 audit-reason]})
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 audit-reason]})
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 audit-reason]})
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-original-interaction-response! conn
application-id
interaction-token
&
{:as opts
:keys [user-agent audit-reason]})
Deletes the initial response to the given interaction.
Returns a promise containing a boolean of if it succeeded.
Deletes the initial response to the given interaction. Returns a promise containing a boolean of if it succeeded.
(delete-own-reaction! conn
channel-id
message-id
emoji
&
{:as opts :keys [user-agent audit-reason]})
Deletes your reaction on the messasge with the given emoji (either unicode or "name:id" for 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 "name:id" for 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 audit-reason]})
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 audit-reason]})
Deletes a given user's reaction to a message with the given emoji (either unicode or "name:id" for 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 "name:id" for a custom emoji). Returns a promise containing a boolean, telling you if it succeeded.
(delete-webhook! conn webhook-id & {:as opts :keys [user-agent audit-reason]})
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-message! conn
webhook-id
webhook-token
message-id
&
{:as opts :keys [user-agent audit-reason]})
Deletes a messages that was sent from the given webhook.
Returns a promise containing a boolean of if it succeeded.
Deletes a messages that was sent from the given 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 audit-reason]})
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-application-command-permissions! conn
application-id
guild-id
command-id
permissions
&
{:as opts
:keys [user-agent audit-reason]})
Sets the permission settings for the given command in the guild.
Returns a promise containing the updated permission settings in a map with some additional information.
Sets the permission settings for the given command in the guild. Returns a promise containing the updated permission settings in a map with some additional information.
(edit-channel-permissions! conn
channel-id
overwrite-id
allow
deny
type
&
{:as opts :keys [user-agent audit-reason]})
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-followup-message!
conn
application-id
interaction-token
message-id
&
{:as opts :keys [content embeds allowed-mentions user-agent audit-reason]})
Edits a followup message to an interaction by its id.
Returns a promise containing the updated message object.
Edits a followup message to an interaction by its id. Returns a promise containing the updated message object.
(edit-global-application-command!
conn
application-id
command-id
&
{:as opts
:keys [ms.command/name ms.command/description ms.command/options
ms.command/default_permission user-agent audit-reason]})
Updates an existing global slash command by its id.
Returns a promise containing the updated application command object.
Updates an existing global slash command by its id. Returns a promise containing the updated application command object.
(edit-guild-application-command!
conn
application-id
guild-id
command-id
&
{:as opts
:keys [ms.command/name ms.command/description ms.command/options
ms.command/default_permission user-agent audit-reason]})
Updates an existing guild slash command by its id.
Returns a promise containing the updated application command object.
Updates an existing guild slash command by its id. Returns a promise containing the updated application command object.
(edit-message! conn
channel-id
message-id
&
{:as opts :keys [content embed user-agent audit-reason]})
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.
(edit-original-interaction-response!
conn
application-id
interaction-token
&
{:as opts :keys [content embeds allowed-mentions user-agent audit-reason]})
Edits the inital response to the given interaction.
Returns a promise containing the updated message object
Edits the inital response to the given interaction. Returns a promise containing the updated message object
(edit-webhook-message!
conn
webhook-id
webhook-token
message-id
&
{:as opts :keys [content embeds allowed-mentions user-agent audit-reason]})
Edits a previously-sent webhook message from the same token.
Returns a promise containing the updated message object.
Edits a previously-sent webhook message from the same token. Returns a promise containing the updated message object.
(execute-webhook! conn
webhook-id
webhook-token
&
{:as opts
:keys [content file stream embeds wait username avatar-url
tts allowed-mentions user-agent audit-reason]})
Executes the given webhook. Returns a promise which contains either a boolean of if the message succeeded, or a map of the response body.
Executes the given webhook. Returns a promise which contains either a boolean of if the message succeeded, or a map of the response body.
(get-application-command-permissions! conn
application-id
guild-id
command-id
&
{:as opts
:keys [user-agent audit-reason]})
Returns a promose containing the permission settings for a specific application command accessible from the guild.
Returns a promose containing the permission settings for a specific application command accessible from the guild.
(get-channel! conn channel-id & {:as opts :keys [user-agent audit-reason]})
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 audit-reason]})
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 audit-reason]})
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 audit-reason]})
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 audit-reason]})
Returns a promise containing a vector of webhook objects.
Returns a promise containing a vector of webhook objects.
(get-current-application-information! conn
&
{:as opts
:keys [user-agent audit-reason]})
Returns a promise containing the bot's OAuth2 application info.
Returns a promise containing the bot's OAuth2 application info.
(get-current-user! conn & {:as opts :keys [user-agent audit-reason]})
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 audit-reason]})
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-global-application-commands! conn
application-id
&
{:as opts :keys [user-agent audit-reason]})
Returns a promise containing a vector of application command objects.
Returns a promise containing a vector of application command objects.
(get-guild! conn
guild-id
&
{:as opts :keys [with-counts user-agent audit-reason]})
Returns a promise containing the guild object.
Returns a promise containing the guild object.
(get-guild-application-commands! conn
application-id
guild-id
&
{:as opts :keys [user-agent audit-reason]})
Returns a promise containing a vector of application command objects.
Returns a promise containing a vector of application command objects.
(get-guild-audit-log! conn
guild-id
&
{:as opts :keys [user-agent audit-reason]})
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 audit-reason]})
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 audit-reason]})
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 audit-reason]})
Returns a promise containing a vector of channel objects.
Returns a promise containing a vector of channel objects.
(get-guild-embed! conn guild-id & {:keys [user-agent audit-reason]})
Returns a promise containing the guild embed object.
DEPRECATED: Prefer using get-guild-widget-settings!
Returns a promise containing the guild embed object. DEPRECATED: Prefer using [[get-guild-widget-settings!]]
(get-guild-emoji! conn
guild-id
emoji
&
{:as opts :keys [user-agent audit-reason]})
Returns a promise containing the given guild emoji object.
Returns a promise containing the given guild emoji object.
(get-guild-guild-application-command-permissions!
conn
application-id
guild-id
&
{:as opts :keys [user-agent audit-reason]})
Returns a promise containing the permission settings for all application commands accessible from the guild.
Returns a promise containing the permission settings for all application commands accessible from the guild.
(get-guild-integrations! conn
guild-id
&
{:as opts :keys [user-agent audit-reason]})
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 audit-reason]})
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 audit-reason]})
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 audit-reason]})
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 audit-reason]})
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 audit-reason]})
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 audit-reason]})
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 audit-reason]})
Returns a promise containing a vector of webhook objects.
Returns a promise containing a vector of webhook objects.
(get-guild-widget! conn guild-id & {:as opts :keys [user-agent audit-reason]})
Returns a promise containing the guild widget object.
Returns a promise containing the guild widget object.
(get-guild-widget-image! conn
guild-id
&
{:as opts :keys [style user-agent audit-reason]})
Returns a promise containing the guild widget image.
Returns a promise containing the guild widget image.
(get-guild-widget-settings! conn
guild-id
&
{:as opts :keys [user-agent audit-reason]})
Returns a promise containing the guild widget settings object.
Returns a promise containing the guild widget settings object.
(get-invite! conn
invite-code
&
{:as opts :keys [with-counts? user-agent audit-reason]})
Returns a promise containing the invite.
Returns a promise containing the invite.
(get-original-interaction-response! conn
application-id
interaction-token
&
{:as opts :keys [user-agent audit-reason]})
Returns a promise containing the response object sent for the given interaction.
Returns a promise containing the response object sent for the given interaction.
(get-pinned-messages! conn
channel-id
&
{:as opts :keys [user-agent audit-reason]})
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 audit-reason]})
Returns a promise containing a list of all users who reacted to the message with the emoji (either unicode or "name:id" for 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 "name:id" for a custom emoji), based on the provided limits.
(get-user! conn user-id & {:as opts :keys [user-agent audit-reason]})
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 audit-reason]})
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 audit-reason]})
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 audit-reason]})
Returns a promise containing a webhook object.
Returns a promise containing a webhook object.
(get-webhook-message! conn
webhook-id
webhook-token
message-id
&
{:as opts :keys [user-agent audit-reason]})
Returns the webhook message sent by the given webhook with the given id.
Returns the webhook message sent by the given webhook with the given id.
(get-webhook-with-token! conn
webhook-id
webhook-token
&
{:as opts :keys [user-agent audit-reason]})
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 audit-reason]})
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 audit-reason]})
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 audit-reason]})
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 audit-reason]})
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 audit-reason]})
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 audit-reason]})
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
audit-reason]})
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
audit-reason]})
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 audit-reason]})
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 audit-reason]})
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 [reason name region verification-level
default-message-notifications explicit-content-filter
afk-channel-id afk-timeout icon owner-id splash
system-channel-id user-agent audit-reason]})
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 audit-reason]})
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 & {:keys [user-agent audit-reason]})
Modifies the guild embed object. Returns a promise containing the modified guild embed object.
DEPRECATED: Prefer using get-guild-widget-settings!
Modifies the guild embed object. Returns a promise containing the modified guild embed object. DEPRECATED: Prefer using [[get-guild-widget-settings!]]
(modify-guild-emoji! conn
guild-id
emoji
name
roles
&
{:as opts :keys [user-agent audit-reason]})
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 audit-reason]})
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 audit-reason]})
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 audit-reason]})
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-guild-widget! conn
guild-id
embed
&
{:as opts :keys [user-agent audit-reason]})
Modifies a guild widget object. Returns a promise containing the modified guild widget.
Modifies a guild widget object. Returns a promise containing the modified guild widget.
(modify-webhook! conn
webhook-id
&
{:as opts
:keys [name avatar channel-id user-agent audit-reason]})
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 audit-reason]})
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 audit-reason]})
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 audit-reason]})
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 audit-reason]})
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.
(send-message! conn channel-id msg & {:keys [tts none embed file] :as opts})
(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 audit-reason]})
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 audit-reason]})
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