Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document soundmojis #7357

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
29 changes: 16 additions & 13 deletions docs/Reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -257,19 +257,20 @@ 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>` |
| 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>` |
| Soundmoji \*\*\* | `<sound:GUILD_ID:SOUND_ID>` | `<sound:613425648685547541:987654321987654321>` |

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://twemoji.twitter.com/) for Desktop/Android and Apple's native emoji on iOS.

Expand All @@ -279,6 +280,8 @@ Timestamps are expressed in seconds and display the given timestamp in the user'

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

\*\*\* `GUILD_ID` should be `0` when a [default sound](#DOCS_RESOURCES_SOUNDBOARD/list-default-soundboard-sounds) is used.

###### Timestamp Styles

| Style | Example Output | Description |
Expand Down
3 changes: 2 additions & 1 deletion docs/resources/Message.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Represents a message sent in a channel within Discord.
| resolved? | [resolved](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-resolved-data-structure) data | data for users, members, channels, and roles in the message's [auto-populated select menus](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/select-menus) |
| poll? \[2\] | [poll](#DOCS_RESOURCES_POLL/poll-object) object | A poll! |
| call? | [message call](#DOCS_RESOURCES_MESSAGE/message-call-object) object | the call associated with the message |
| soundboard_sounds? | array of [soundboard sounds](#DOCS_RESOURCES_SOUNDBOARD/soundboard-sound-object) | sent if the message contains soundmojis

\[1\] The author object follows the structure of the user object, but is only a valid user in the case where the message is generated by a user or bot user. If the message is generated by a webhook, the author object corresponds to the webhook's id, username, and avatar. You can tell if a message is generated by a webhook by checking for the `webhook_id` on the message object.

Expand Down Expand Up @@ -416,7 +417,7 @@ The encoding, and the waveform details, are an implementation detail and may cha
| message\* | partial [message](#DOCS_RESOURCES_MESSAGE/message-object) object | minimal subset of fields in the forwarded message |

\* The current subset of message fields consists of:
`type`, `content`, `embeds`, `attachments`, `timestamp`, `edited_timestamp`, `flags`, `mentions`, `mention_roles`, `stickers`, `sticker_items`, and `components`.
`type`, `content`, `embeds`, `attachments`, `timestamp`, `edited_timestamp`, `flags`, `mentions`, `mention_roles`, `stickers`, `sticker_items`, `components`, and `soundboard_sounds`.

> info
> While message snapshots are able to support nested snapshots, we currently limit the depth of nesting to 1.
Expand Down