Skip to content

Commit e3cd377

Browse files
improve message formatting docs
1 parent 9cfc842 commit e3cd377

File tree

1 file changed

+32
-29
lines changed

1 file changed

+32
-29
lines changed

discord/developers/docs/reference.mdx

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -267,27 +267,30 @@ Discord utilizes a subset of markdown for rendering message content on its clien
267267
<ManualAnchor id="message-formatting-formats" />
268268
**Formats**
269269
270-
| Type | Structure | Example |
271-
|-------------------------|-----------------------|---------------------------------|
272-
| User | `<@USER_ID>` | `<@80351110224678912>` |
273-
| User \* | `<@!USER_ID>` | `<@!80351110224678912>` |
274-
| Channel | `<#CHANNEL_ID>` | `<#103735883630395392>` |
275-
| Role | `<@&ROLE_ID>` | `<@&165511591545143296>` |
276-
| Slash Command \*\* | `</NAME:COMMAND_ID>` | `</airhorn:816437322781949972>` |
277-
| Standard Emoji | Unicode Characters | 🦶 |
278-
| Custom Emoji | `<:NAME:ID>` | `<:mmLol:216154654256398347>` |
279-
| Custom Emoji (Animated) | `<a:NAME:ID>` | `<a:b1nzy:392938283556143104>` |
280-
| Unix Timestamp | `<t:TIMESTAMP>` | `<t:1618953630>` |
281-
| Unix Timestamp (Styled) | `<t:TIMESTAMP:STYLE>` | `<t:1618953630:d>` |
282-
| Guild Navigation | `<id:TYPE>` | `<id:customize>` |
270+
| Type | Structure | Example |
271+
|--------------------------------------|------------------------------------------|--------------------------------------|
272+
| User | `<@USER_ID>` | `<@80351110224678912>` |
273+
| User * | `<@!USER_ID>` | `<@!80351110224678912>` |
274+
| Channel | `<#CHANNEL_ID>` | `<#103735883630395392>` |
275+
| Role | `<@&ROLE_ID>` | `<@&165511591545143296>` |
276+
| Slash command | `</NAME:COMMAND_ID>` | `</airhorn:816437322781949972>` |
277+
| Slash command with subcommand | `</NAME SUBCOMMAND:ID>` | `</foo bar:123456789012345678>` |
278+
| Slash command with subcommand group | `</NAME SUBCOMMAND_GROUP SUBCOMMAND:ID>` | `</foo group bar:123456789012345678>`|
279+
| Standard emoji | Unicode characters | 🪴 |
280+
| Custom emoji | `<:NAME:ID>` | `<:mmLol:216154654256398347>` |
281+
| Animated custom emoji | `<a:NAME:ID>` | `<a:b1nzy:392938283556143104>` |
282+
| Unix timestamp | `<t:TIMESTAMP>` | `<t:1618953630>` |
283+
| Styled unix timestamp | `<t:TIMESTAMP:STYLE>` | `<t:1618953630:d>` |
284+
| Guild navigation | `<id:TYPE>` | See below |
283285
284-
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.
285286
286-
Timestamps are expressed in seconds and display the given timestamp in the user's timezone and locale.
287+
Using the markdown for users or roles will mention the target(s), and notify them depending on the sender's permissions as well as the value of the `allowed_mentions` field when creating a message.
288+
Standard emoji are currently rendered using [Twemoji](https://github.com/jdecked/twemoji) for Desktop and Android while iOS devices use Apple's native emoji set.
287289
288-
\* User mentions with an exclamation mark are deprecated and should be handled like any other user mention.
290+
Timestamps are expressed in **seconds** and display the given timestamp in the user's timezone and locale.
291+
292+
\* User mentions with an exclamation point are deprecated and should be handled like any other user mention.
289293
290-
\*\* Subcommands and subcommand groups can also be mentioned by using respectively `</NAME SUBCOMMAND:ID>` and `</NAME SUBCOMMAND_GROUP SUBCOMMAND:ID>`.
291294
292295
**Timestamp Styles**
293296
@@ -301,25 +304,25 @@ Timestamps are expressed in seconds and display the given timestamp in the user'
301304
| F | Tuesday, April 20, 2021 at 16:20 | Full Date, Short Time |
302305
| s | 20/04/2021, 16:20 | Short Date, Short Time |
303306
| S | 20/04/2021, 16:20:30 | Short Date, Medium Time |
304-
| R | 2 months ago | Relative Time |
307+
| R | 4 years ago | Relative Time |
305308
306309
\*default
307310
308311
**Guild Navigation Types**
309312
310313
Guild navigation types link to the corresponding resource in the current server.
311314
312-
| Type | Description |
313-
|--------------|----------------------------------------------------------------------------------------------------------------|
314-
| customize | Customize tab with the server's [onboarding prompts](/developers/docs/resources/guild#guild-onboarding-object) |
315-
| browse | Browse Channels tab |
316-
| guide | [Server Guide](https://support.discord.com/hc/en-us/articles/13497665141655) |
317-
| linked-roles | [Linked Roles](https://support.discord.com/hc/en-us/articles/10388356626711) |
318-
| linked-roles | Linked Role connection |
315+
| Full Syntax | Linked Resource |
316+
|----------------------|----------------------------------------------------------------------------------------------------------------|
317+
| <id:customize> | Channel & Roles tab with [Onboarding prompts](/developers/docs/resources/guild#guild-onboarding-object) |
318+
| <id:browse> | Browse Channels tab |
319+
| <id:guide> | [Server Guide](https://support.discord.com/hc/en-us/articles/13497665141655) tab |
320+
| <id:linked-roles> | [Linked Roles](https://support.discord.com/hc/en-us/articles/10388356626711) tab |
321+
| <id:linked-roles:id> | Specific linked role, opening the connection modal on click (the second `id` is the role id) |
319322
320323
## Image Formatting
321324
322-
**Image Base Url**
325+
**Image Base URL**
323326
324327
```bash
325328
https://cdn.discordapp.com/
@@ -376,7 +379,7 @@ Discord uses ids and hashes to render images in the client. These hashes can be
376379
\*\*\*\*\* For Custom Emoji, we highly recommend requesting emojis as WebP for maximum performance and compatibility. Emojis can be uploaded as JPEG, PNG, GIF, WebP, and AVIF formats. WebP and AVIF formats must be requested as WebP since they don't convert well to other formats. The Discord client uses WebP for all emojis displayed in-app. See the [Emoji Resource](/developers/docs/resources/emoji) page for more details.
377380
378381
<Info>
379-
Sticker GIFs do not use the CDN base url, and can be accessed at `https://media.discordapp.net/stickers/<sticker_id>.gif`.
382+
Sticker GIFs do not use the CDN base URL, and can be accessed at `https://media.discordapp.net/stickers/<sticker_id>.gif`.
380383
</Info>
381384
382385
## Image Data
@@ -542,9 +545,9 @@ For example:
542545
| bg | Bulgarian | български |
543546
| ru | Russian | Pусский |
544547
| uk | Ukrainian | Українська |
545-
| hi | Hindi | हिन्दी |
548+
| hi | Hindi | हिन्दी |
546549
| th | Thai | ไทย |
547550
| zh-CN | Chinese, China | 中文 |
548551
| ja | Japanese | 日本語 |
549552
| zh-TW | Chinese, Taiwan | 繁體中文 |
550-
| ko | Korean | 한국어 |
553+
| ko | Korean | 한국어 |

0 commit comments

Comments
 (0)