Liking cljdoc? Tell your friends :D

discljord.formatting

Contains utility functions to help with Discord message formatting.

Contains utility functions to help with Discord message formatting.
raw docstring

block-quoteclj

(block-quote text)

Returns the given text in a blockquote, with new lines pre- and appended.

I.e.:

text

Returns the given text in a blockquote, with new lines pre- and appended.

I.e.:
> text
sourceraw docstring

boldclj

(bold text)

Returns the given text in bold.

Returns the given text in **bold**.
sourceraw docstring

channel-mentionclj

Regex pattern that matches text channel mentions.

Captures the channel id in its first capture group labelled "id".

Regex pattern that matches text channel mentions.

Captures the channel id in its first capture group labelled "id".
sourceraw docstring

codeclj

(code text)

Wraps the given text in an inline code block.

Wraps the given text in an `inline code block`.
sourceraw docstring

code-blockclj

(code-block text)
(code-block lang text)

Puts the given text in a codeblock with corresponding syntax highlighting, if a language is given.

I.e.:

text
Puts the given text in a codeblock with corresponding syntax highlighting, if a language is given.

I.e.:
```lang
text
```
sourceraw docstring

(embed-link text url)
(embed-link text url title)

Creates an inline-style link with an optional title.

I.e.: text or text. Can only be used in embeds, not in regular messages.

Creates an inline-style link with an optional title.

I.e.: [text](url "title") or [text](url).
Can only be used in embeds, not in regular messages.
sourceraw docstring

emoji-mentionclj

Regex pattern that matches custom emoji mentions.

(Optionally) captures the a prefix in its first capture group labelled "animated" to indicate if the emoji is animated; Captures the emoji name in its second capture group labelled "name" and the id in a last capture group labelled "id".

Regex pattern that matches custom emoji mentions.

(Optionally) captures the `a` prefix in its first capture group labelled "animated"
to indicate if the emoji is animated; Captures the emoji name in its second capture group labelled
"name" and the id in a last capture group labelled "id".
sourceraw docstring

full-block-quoteclj

The full block quote (>>>).

Everything that follows this separator is shown as a block quote in Discord messages.

The full block quote (`>>>`).

Everything that follows this separator is shown as a block quote in Discord messages.
sourceraw docstring

italicsclj

(italics text)

Returns the given text as italics.

Returns the given text as *italics*.
sourceraw docstring

mention-channelclj

(mention-channel channel)

Takes a text channel object or id and returns a mention of that channel for use in messages.

Takes a text channel object or id and returns a mention of that channel for use in messages.
sourceraw docstring

mention-emojiclj

(mention-emoji emoji)

Takes an emoji object or a custom emoji id and returns a mention of that emoji for use in messages.

A provided emoji object may also represent a regular unicode emoji with just a name, in which case that name will be returned.

Takes an emoji object or a custom emoji id and returns a mention of that emoji for use in messages.

A provided emoji object may also represent a regular unicode emoji with just a name,
in which case that name will be returned.
sourceraw docstring

mention-roleclj

(mention-role role)

Takes a role object or id and returns a mention of that role for use in messages.

Takes a role object or id and returns a mention of that role for use in messages.
sourceraw docstring

mention-userclj

(mention-user user)

Takes a user object or id and returns a mention of that user for use in messages.

Takes a user object or id and returns a mention of that user for use in messages.
sourceraw docstring

role-mentionclj

Regex pattern that matches role mentions.

Captures the role id in its first capture group labelled "id".

Regex pattern that matches role mentions.

Captures the role id in its first capture group labelled "id".
sourceraw docstring

strike-throughclj

(strike-through text)

Returns the given text with ~~strikethrough~~.

Returns the given text with ~~strikethrough~~.
sourceraw docstring

underlineclj

(underline text)

Returns the given text underlined.

Returns the given text __underlined__.
sourceraw docstring

user-mentionclj

Regex pattern that matches user or member mentions.

Captures the user id in its first capture group labelled "id".

Regex pattern that matches user or member mentions.

Captures the user id in its first capture group labelled "id".
sourceraw docstring

user-tagclj

(user-tag {:keys [username discriminator] :as user})

Takes a user object and returns a string representing it as a tag, i.e. "username#discriminator".

Takes a user object and returns a string representing it as a tag, i.e. "username#discriminator".
sourceraw docstring

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

× close