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

Stickers documentation #2155

Merged
merged 9 commits into from
Nov 13, 2020
Merged
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
6 changes: 6 additions & 0 deletions docs/Change_Log.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## Stickers

#### November 13, 2020

Stickers are now documented as part of the [message](#DOCS_RESOURCES_CHANNEL/message-object) object.

## API and Gateway V8

#### September 24, 2020
Expand Down
26 changes: 26 additions & 0 deletions docs/resources/Channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ Represents a message sent in a channel within Discord.
| application? | [message application](#DOCS_RESOURCES_CHANNEL/message-object-message-application-structure) object | sent with Rich Presence-related chat embeds |
| message_reference? | [message reference](#DOCS_RESOURCES_CHANNEL/message-object-message-reference-structure) object | reference data sent with crossposted messages |
| 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_RESOURCE_CHANNEL/message-object-message-sticker-structure) objects | the stickers sent with the message (bots currently can only receive messages with stickers, not send) |

\* 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 @@ -275,6 +276,31 @@ Represents a message sent in a channel within Discord.
| SOURCE_MESSAGE_DELETED | 1 << 3 | the source message for this crosspost has been deleted (via Channel Following) |
| URGENT | 1 << 4 | this message came from the urgent message system |


###### Message Sticker Structure

| Field | Type | Description |
| ---------------- | --------- | ------------------------------------------------------------------------------------- |
| id | snowflake | id of the sticker |
| pack_id | snowflake | id of the pack the sticker is from |
| name | string | name of the sticker |
| description | string | description of the sticker |
| tags? | string | a comma-separated list of tags for the sticker |
| asset\* | string | sticker asset hash |
| preview_asset\* | ?string | sticker preview asset hash |
| format_type | integer | [type of sticker format](#DOCS_RESOURCES_CHANNEL/message-object-sticker-format-types) |

\* 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
1 change: 1 addition & 0 deletions docs/topics/Opcodes_and_Status_Codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ Along with the HTTP error code, our API can also return more detailed error code
| 50036 | An invite was accepted to a guild the application's bot is not in |
| 50041 | Invalid API version provided |
| 50074 | Cannot delete a channel required for Community guilds |
| 50081 | Invalid sticker sent |
| 90001 | Reaction was blocked |
| 130000 | API resource is currently overloaded. Try again a little later |

Expand Down