Contains utility functions to help with Discord message formatting.
Contains utility functions to help with Discord message formatting.
(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
(bold text)
Returns the given text in bold.
Returns the given text in **bold**.
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".
(code text)
Wraps the given text in an inline code block
.
Wraps the given text in an `inline code block`.
(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 ```
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".
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.
(italics text)
Returns the given text as italics.
Returns the given text as *italics*.
(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.
(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.
(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.
(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.
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".
(strike-through text)
Returns the given text with ~~strikethrough~~.
Returns the given text with ~~strikethrough~~.
(timestamp unix-timestamp)
(timestamp unix-timestamp style)
Creates a timestamp that will be displayed according to each user's locale.
An optional style (one of timestamp-styles
) can be set. The default is :short-date-time
.
The timestamp is a UNIX timestamp (seconds).
Creates a timestamp that will be displayed according to each user's locale. An optional style (one of [[timestamp-styles]]) can be set. The default is `:short-date-time`. The timestamp is a UNIX timestamp (seconds).
The available timestamp display styles.
The available timestamp display styles.
(underline text)
Returns the given text underlined.
Returns the given text __underlined__.
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".
(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".
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close