Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 22 additions & 18 deletions docs/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -259,28 +259,32 @@ Discord utilizes a subset of markdown for rendering message content on its clien

###### Formats

| Type | Structure | Example |
|-------------------------|-----------------------|---------------------------------|
| User | `<@USER_ID>` | `<@80351110224678912>` |
| User \* | `<@!USER_ID>` | `<@!80351110224678912>` |
| Channel | `<#CHANNEL_ID>` | `<#103735883630395392>` |
| Role | `<@&ROLE_ID>` | `<@&165511591545143296>` |
| Slash Command \*\* | `</NAME:COMMAND_ID>` | `</airhorn:816437322781949972>` |
| Standard Emoji | Unicode Characters | 🦶 |
| Custom Emoji | `<:NAME:ID>` | `<:mmLol:216154654256398347>` |
| Custom Emoji (Animated) | `<a:NAME:ID>` | `<a:b1nzy:392938283556143104>` |
| Unix Timestamp | `<t:TIMESTAMP>` | `<t:1618953630>` |
| Unix Timestamp (Styled) | `<t:TIMESTAMP:STYLE>` | `<t:1618953630:d>` |
| Guild Navigation | `<id:TYPE>` | `<id:customize>` |

Using the markdown for either users, roles, or channels will usually mention the target(s) accordingly, but this can be suppressed using the `allowed_mentions` parameter when creating a message. Standard emoji are currently rendered using [Twemoji](https://github.com/jdecked/twemoji) for Desktop/Android and Apple's native emoji on iOS.

Timestamps are expressed in seconds and display the given timestamp in the user's timezone and locale.
| Type | Structure | Example |
|--------------------------------|-----------------------|---------------------------------|
| User | `<@USER_ID>` | `<@80351110224678912>` |
| User \* | `<@!USER_ID>` | `<@!80351110224678912>` |
| Channel | `<#CHANNEL_ID>` | `<#103735883630395392>` |
| Role | `<@&ROLE_ID>` | `<@&165511591545143296>` |
| Slash Command \*\* | `</NAME:COMMAND_ID>` | `</airhorn:816437322781949972>` |
| Standard Emoji | Unicode Characters | 🦶 |
| Custom Emoji | `<:NAME:ID>` | `<:mmLol:216154654256398347>` |
| Custom Emoji (Animated) | `<a:NAME:ID>` | `<a:b1nzy:392938283556143104>` |
| Unix Timestamp \*\*\* | `<t:TIMESTAMP>` | `<t:1618953630>` |
| Unix Timestamp (Styled) \*\*\* | `<t:TIMESTAMP:STYLE>` | `<t:1618953630:d>` |
| Guild Navigation | `<id:TYPE>` | `<id:customize>` |
| Email \*\*\*\* | `<USERNAME@DOMAIN>` | `<[email protected]>` |
| Phone Number \*\*\*\* | `<+PHONE_NUMBER>` | `<+1 (555) 123 4567>` |

Using the markdown for either users, roles, or channels will usually mention the target(s) accordingly, but this can be suppressed using the [`allowed_mentions`](/docs/resources/message#message-object) parameter (when creating a message). Standard emoji are currently rendered using [Twemoji](https://github.com/jdecked/twemoji) for Desktop/Android and Apple's native emoji on iOS.

\* User mentions with an exclamation mark are deprecated and should be handled like any other user mention.

\*\* Subcommands and subcommand groups can also be mentioned by using respectively `</NAME SUBCOMMAND:ID>` and `</NAME SUBCOMMAND_GROUP SUBCOMMAND:ID>`.

\*\*\* Timestamps are expressed in seconds and display the given timestamp in the user's timezone and locale.

\*\*\*\* Email and phone number markdown uses `mailto:` and `tel:` URI schemes respectively that can optionally be prefixed (e.g. `<mailto:[email protected]>`). Email markdown supports headers, values must be [URL Encoded](https://en.wikipedia.org/wiki/Percent-encoding) (e.g. `<[email protected]?subject=Message%20Title&body=Message%20Content>`).

###### Timestamp Styles

| Style | Example Output | Description |
Expand All @@ -293,7 +297,7 @@ Timestamps are expressed in seconds and display the given timestamp in the user'
| F | Tuesday, 20 April 2021 16:20 | Long Date/Time |
| R | 2 months ago | Relative Time |

\*default
\* Default style used when no style is specified.

###### Guild Navigation Types

Expand Down