discljord.messaging

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!

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

add-guild-member!

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

add-guild-member-role!

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

add-thread-member!

(add-thread-member! conn channel-id user-id & {:as opts, :keys [:user-agent :audit-reason]})
Adds a member to a thread.

Requires the thread is not archived and the ability to send messages in the thread.
Returns a promise containing a boolean of if it succeeded.

batch-edit-application-command-permissions!

(batch-edit-application-command-permissions! conn application-id guild-id permissions-array & {:as opts, :keys [:user-agent :audit-reason]})
Batch edits the permission settings for all commands in a guild.

This will overwrite all existing permissions for all commands in the guild.
Returns a promise containing the updated permission settings.

begin-guild-prune!

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

bulk-delete-messages!

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

bulk-overwrite-global-application-commands!

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

bulk-overwrite-guild-application-commands!

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

create-channel-invite!

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

create-dm!

(create-dm! conn user-id & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing a DM channel object with the given user.

create-followup-message!

(create-followup-message! conn application-id interaction-token & {:as opts, :keys [:content :file :stream :embeds :username :avatar-url :tts :allowed-mentions :components :flags :user-agent :audit-reason]})
Creates a followup message for the given interaction.

Returns a promise containing the message that was created.

create-global-application-command!

(create-global-application-command! conn application-id name description & {:as opts, :keys [:options :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.

create-group-dm!

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

create-guild!

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

create-guild-application-command!

(create-guild-application-command! conn application-id guild-id name description & {:as opts, :keys [:options :default-permission :user-agent :audit-reason]})
Creates or updates a guild slash command.

Returns a promise containing the new application command object.

create-guild-ban!

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

create-guild-channel!

(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 :audit-reason]})
Returns a promise containing the new channel object.

create-guild-emoji!

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

create-guild-integration!

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

create-guild-role!

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

create-interaction-response!

(create-interaction-response! conn interaction-id interaction-token type & {:as opts, :keys [:data :file :stream :user-agent :audit-reason]})
Sends a response to an interaction event.

Returns a promise containing a boolean of if it succeeded.

create-message!

(create-message! conn channel-id & {:as opts, :keys [:content :tts :nonce :embed :file :allowed-mentions :attachments :stream :message-reference :components :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)

create-reaction!

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

create-webhook!

(create-webhook! conn channel-id name & {:as opts, :keys [:avatar :user-agent :audit-reason]})
Returns a promise containing the new webhook object.

defendpoint

macro

(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 endpoint 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!

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

delete-all-reactions-for-emoji!

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

delete-channel!

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

delete-channel-permission!

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

delete-followup-message!

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

delete-global-application-command!

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

delete-guild!

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

delete-guild-application-command!

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

delete-guild-emoji!

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

delete-guild-integration!

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

delete-guild-role!

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

delete-invite!

(delete-invite! conn invite-code & {:as opts, :keys [:user-agent :audit-reason]})
Deletes the invite. Returns a promise containing the deleted invite.

delete-message!

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

delete-original-interaction-response!

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

delete-own-reaction!

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

delete-pinned-channel-message!

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

delete-user-reaction!

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

delete-webhook!

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

delete-webhook-message!

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

delete-webhook-with-token!

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

edit-application-command-permissions!

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

edit-channel-permissions!

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

edit-followup-message!

(edit-followup-message! conn application-id interaction-token message-id & {:as opts, :keys [:content :embeds :allowed-mentions :components :user-agent :audit-reason]})
Edits a followup message to an interaction by its id.

Returns a promise containing the updated message object.

edit-global-application-command!

(edit-global-application-command! conn application-id command-id & {:as opts, :keys [:name :description :options :default-permission :user-agent :audit-reason]})
Updates an existing global slash command by its id.

Returns a promise containing the updated application command object.

edit-guild-application-command!

(edit-guild-application-command! conn application-id guild-id command-id & {:as opts, :keys [:name :description :options :default-permission :user-agent :audit-reason]})
Updates an existing guild slash command by its id.

Returns a promise containing the updated application command object.

edit-message!

(edit-message! conn channel-id message-id & {:as opts, :keys [:content :embed :components :user-agent :audit-reason]})
Edits the given message with the new content or embed. Returns a promise containing the new message.

edit-original-interaction-response!

(edit-original-interaction-response! conn application-id interaction-token & {:as opts, :keys [:content :embeds :allowed-mentions :components :user-agent :audit-reason]})
Edits the inital response to the given interaction.

Returns a promise containing the updated message object

edit-webhook-message!

(edit-webhook-message! conn webhook-id webhook-token message-id & {:as opts, :keys [:content :embeds :allowed-mentions :components :user-agent :audit-reason]})
Edits a previously-sent webhook message from the same token.

Returns a promise containing the updated message object.

execute-webhook!

(execute-webhook! conn webhook-id webhook-token & {:as opts, :keys [:content :file :stream :embeds :wait :username :avatar-url :tts :allowed-mentions :components :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.

get-application-command-permissions!

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

get-channel!

(get-channel! conn channel-id & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing a channel object.

get-channel-invites!

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

get-channel-message!

(get-channel-message! conn channel-id message-id & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing the message object.

get-channel-messages!

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

get-channel-webhooks!

(get-channel-webhooks! conn channel-id & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing a vector of webhook objects.

get-current-application-information!

(get-current-application-information! conn & {:as opts, :keys [:user-agent :audit-reason]})
Returns  a promise containing the bot's OAuth2 application info.

get-current-user!

(get-current-user! conn & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing the user object for the current user.

get-current-user-guilds!

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

get-global-application-commands!

(get-global-application-commands! conn application-id & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing a vector of application command objects.

get-guild!

(get-guild! conn guild-id & {:as opts, :keys [:with-counts :user-agent :audit-reason]})
Returns a promise containing the guild object.

get-guild-application-command-permissions!

(get-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.

get-guild-application-commands!

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

get-guild-audit-log!

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

get-guild-ban!

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

get-guild-bans!

(get-guild-bans! conn guild-id & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing a vector of ban objects.

get-guild-channels!

(get-guild-channels! conn guild-id & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing a vector of channel objects.

get-guild-embed!

deprecated

(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!]]

get-guild-emoji!

(get-guild-emoji! conn guild-id emoji & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing the given guild emoji object.

get-guild-integrations!

(get-guild-integrations! conn guild-id & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing a vector of guild integration objects.

get-guild-invites!

(get-guild-invites! conn guild-id & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing a vector of guild invite objects.

get-guild-member!

(get-guild-member! conn guild-id user-id & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing the guild member object.

get-guild-prune-count!

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

get-guild-roles!

(get-guild-roles! conn guild-id & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing a vector of role objects.

get-guild-vanity-url!

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

get-guild-voice-regions!

(get-guild-voice-regions! conn guild-id & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing a vector of voice region objects.

get-guild-webhooks!

(get-guild-webhooks! conn guild-id & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing a vector of webhook objects.

get-guild-widget!

(get-guild-widget! conn guild-id & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing the guild widget object.

get-guild-widget-image!

(get-guild-widget-image! conn guild-id & {:as opts, :keys [:style :user-agent :audit-reason]})
Returns a promise containing the guild widget image.

get-guild-widget-settings!

(get-guild-widget-settings! conn guild-id & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing the guild widget settings object.

get-invite!

(get-invite! conn invite-code & {:as opts, :keys [:with-counts? :user-agent :audit-reason]})
Returns a promise containing the invite.

get-original-interaction-response!

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

get-pinned-messages!

(get-pinned-messages! conn channel-id & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing a list of message objects.

get-reactions!

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

get-user!

(get-user! conn user-id & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing the user object for the given user.

get-user-connections!

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

get-user-dms!

(get-user-dms! conn & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing a vector of DM channel objects.

get-webhook!

(get-webhook! conn webhook-id & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing a webhook object.

get-webhook-message!

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

get-webhook-with-token!

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

group-dm-add-recipient!

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

group-dm-remove-recipient!

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

join-thread!

(join-thread! conn channel-id & {:as opts, :keys [:user-agent :audit-reason]})
Adds the current user to a thread.

Requires the thread is not archived.
Returns a promise containing a boolean of if it succeeded.

leave-guild!

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

leave-thread!

(leave-thread! conn channel-id & {:as opts, :keys [:user-agent :audit-reason]})
Removes the current user from a thread.

Returns a promise containing a boolean of if it succeeded.

list-active-threads!

(list-active-threads! conn guild-id & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing all active threads in the guild and thread member objects for the current user.

list-guild-emojis!

(list-guild-emojis! conn guild-id & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing a vector of guild emoji objects.

list-guild-members!

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

list-joined-private-archived-threads!

(list-joined-private-archived-threads! conn channel-id & {:as opts, :keys [:before :limit :user-agent :audit-reason]})
Returns a promise containing all private archived threads, thread member objects for the current user
and a boolean indicating whether there are possibly more private archived threads in the given channel
that the current user has joined.

Requires `:read-message-history` permissions.

list-private-archived-threads!

(list-private-archived-threads! conn channel-id & {:as opts, :keys [:before :limit :user-agent :audit-reason]})
Returns a promise containing all private archived threads, thread member objects for the current user
and a boolean indicating whether there are possibly more private archived threads in the given channel.

Requires `:read-message-history` and `:manage-threads` permissions.

list-public-archived-threads!

(list-public-archived-threads! conn channel-id & {:as opts, :keys [:before :limit :user-agent :audit-reason]})
Returns a promise containing all public archived threads, thread member objects for the current user
and a boolean indicating whether there are possibly more public archived threads in the given channel.

Requires `:read-message-history` permissions.

list-thread-members!

(list-thread-members! conn channel-id & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing a vector of thread member objects for the given thread.

list-voice-regions!

(list-voice-regions! conn & {:as opts, :keys [:user-agent :audit-reason]})
Returns a promise containing a vector of voice regions.

modifiy-guild-role!

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

modify-channel!

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

modify-current-user!

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

modify-current-user-nick!

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

modify-guild!

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

modify-guild-channel-positions!

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

modify-guild-embed!

deprecated

(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!]]

modify-guild-emoji!

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

modify-guild-integration!

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

modify-guild-member!

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

modify-guild-role-positions!

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

modify-guild-widget!

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

modify-webhook!

(modify-webhook! conn webhook-id & {:as opts, :keys [:name :avatar :channel-id :user-agent :audit-reason]})
Returns a promise containing the modified webhook object.

modify-webhook-with-token!

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

remove-guild-ban!

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

remove-guild-member!

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

remove-guild-member-role!

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

remove-thread-member!

(remove-thread-member! conn channel-id user-id & {:as opts, :keys [:user-agent :audit-reason]})
Removes a member from a thread.

Requires `:manage-threads` permissions or that you're the creator of the thread and the thread is not archived.
Returns a promise containing a boolean of if it succeeded.

search-guild-members!

(search-guild-members! conn guild-id query & {:as opts, :keys [:limit :user-agent :audit-reason]})
Returns a promise containing a vector of the guild member objects matching the search.

send-message!

deprecated

(send-message! conn channel-id msg & {:keys [tts none embed file], :as opts})

spec-ns

start-connection!

(start-connection! token)
Takes a token for a bot, and returns a channel which is passed
to the various messaging functions.

start-thread-with-message!

(start-thread-with-message! conn channel-id message-id name auto-archive-duration & {:as opts, :keys [:user-agent :audit-reason]})
Creates a new thread from an existing message.

Returns a promise containing a channel object.

start-thread-without-message!

(start-thread-without-message! conn channel-id name auto-archive-duration type & {:as opts, :keys [:user-agent :audit-reason]})
Creates a new thread that is not connected to an existing message (private thread).

Returns a promise containing a channel object.

stop-connection!

(stop-connection! conn)
Takes a channel returned by start-connection! and stops the associated
connection.

sync-guild-integration!

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

trigger-typing-indicator!

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