Skip to content

Commit

Permalink
Adds documentation for sticker_items (discord#3171)
Browse files Browse the repository at this point in the history
* Adds documentation for sticker_items

* Corrects capitalization

* Make consistent with other resources

* Reorganizes sections
  • Loading branch information
jfurrow authored Jun 25, 2021
1 parent 20b6e18 commit 101c24d
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions docs/resources/Channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,12 @@ Represents a message sent in a channel within Discord.
| application_id? | snowflake | if the message is a response to an [Interaction](#DOCS_INTERACTIONS_SLASH_COMMANDS/), this is the id of the interaction's application |
| message_reference? | [message reference](#DOCS_RESOURCES_CHANNEL/message-reference-object-message-reference-structure) object | data showing the source of a crosspost, channel follow add, pin, or reply message |
| flags? | integer | [message flags](#DOCS_RESOURCES_CHANNEL/message-object-message-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) |
| stickers? | array of [sticker](#DOCS_RESOURCES_CHANNEL/message-object-message-sticker-structure) objects | **Deprecated** the stickers sent with the message (bots currently can only receive messages with stickers, not send) |
| referenced_message?\*\*\*\*\* | ?[message object](#DOCS_RESOURCES_CHANNEL/message-object) | the message associated with the message_reference |
| interaction? | [message interaction object](#DOCS_INTERACTIONS_SLASH_COMMANDS/message-interaction-object-message-interaction-structure) | sent if the message is a response to an [Interaction](#DOCS_INTERACTIONS_SLASH_COMMANDS/) |
| thread? | [channel](#DOCS_RESOURCES_CHANNEL/channel) object | the thread that was started from this message, includes [thread member](#DOCS_RESOURCES_CHANNEL/thread-member-object) object |
| components? | Array of [message components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/component-object) | sent if the message contains components like buttons, action rows, or other interactive components |
| sticker_items?\*\*\*\*\*\* | array of [message sticker item objects](#DOCS_RESOURCES_CHANNEL/message-object-message-sticker-item-structure) | sent if the message contains stickers |
| stickers? | array of [sticker](#DOCS_RESOURCES_CHANNEL/message-object-message-sticker-structure) objects | **Deprecated** the stickers sent with the message |

\* 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 All @@ -278,6 +279,8 @@ Represents a message sent in a channel within Discord.

\*\*\*\*\* This field is only returned for messages with a `type` of `19` (REPLY) or `21` (THREAD_STARTER_MESSAGE). If the message is a reply but the `referenced_message` field is not present, the backend did not attempt to fetch the message that was being replied to, so its state is unknown. If the field exists but is null, the referenced message was deleted.

\*\*\*\*\*\* Bots cannot send stickers.

###### Message Types

> warn
Expand Down Expand Up @@ -337,6 +340,25 @@ Represents a message sent in a channel within Discord.
| EPHEMERAL | 1 << 6 | this message is only visible to the user who invoked the Interaction |
| LOADING | 1 << 7 | this message is an Interaction Response and the bot is "thinking" |

###### Message Sticker Item Structure

The smallest amount of data required to render a sticker.

| Field | Type | Description |
| ---------------- | --------- | --------------------------------------------------------------------------------------------- |
| id | snowflake | id of the sticker |
| name | string | name of the sticker |
| format_type | integer | [type of sticker format](#DOCS_RESOURCES_CHANNEL/message-object-message-sticker-format-types) |

###### Message Sticker Format Types

| Type | Value |
| ------ | ----- |
| PNG | 1 |
| APNG | 2 |
| LOTTIE | 3 |


###### Message Sticker Structure

| Field | Type | Description |
Expand All @@ -355,15 +377,6 @@ Represents a message sent in a channel within Discord.

\* The URL for fetching sticker assets is currently private.

###### Message Sticker Format Types

| Type | Value |
| ------ | ----- |
| PNG | 1 |
| APNG | 2 |
| LOTTIE | 3 |


###### Example Message

```json
Expand Down

0 comments on commit 101c24d

Please sign in to comment.