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 sticker packs, sticker routes, and guild stickers #3128

Merged
merged 26 commits into from
Jul 19, 2021
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
fccd6f0
Document sticker packs and sticker routes
advaith1 Jun 16, 2021
7289094
update sort_value desc
advaith1 Jun 16, 2021
8a170c9
fix header
advaith1 Jun 16, 2021
147f8c0
Document guild.stickers
advaith1 Jun 16, 2021
0b7f14d
Document create, modify, and delete routes
advaith1 Jun 16, 2021
e17f6fe
Document /stickers/:id
advaith1 Jun 18, 2021
57e9b57
document that manage_emojis controls stickers too
advaith1 Jun 23, 2021
db5a0cc
fix req'd permission and update name
advaith1 Jun 25, 2021
e5863b3
mark cover_sticker_id as optional
advaith1 Jun 25, 2021
c78e881
Document Guild Stickers Update gateway event
advaith1 Jul 2, 2021
8fce653
Merge branch 'master' into sticker-packs
advaith1 Jul 2, 2021
ce4848a
add sticker item object to sticker file
advaith1 Jul 2, 2021
ab75fcb
Document sending sticker_ids
advaith1 Jul 2, 2021
27fffb6
description is nullable, update endpoint docs, add error codes
advaith1 Jul 2, 2021
6ebab4a
update sticker.available description
advaith1 Jul 2, 2021
c0070a6
add sticker audit log events and change keys
advaith1 Jul 2, 2021
d294da3
document that tags is the Discord name
advaith1 Jul 2, 2021
e2b3d77
Document the sticker CDN endpoint
advaith1 Jul 3, 2021
2af8851
update sticker.available desc x2
advaith1 Jul 3, 2021
c54291b
add error 170005
advaith1 Jul 7, 2021
03626e1
Add USE_EXTERNAL_STICKERS permission
advaith1 Jul 16, 2021
9f0219e
Merge remote-tracking branch 'upstream/master' into sticker-packs
advaith1 Jul 17, 2021
8113d3d
Merge branch 'master' into sticker-packs
advaith1 Jul 17, 2021
fb59f04
audit log reason header
advaith1 Jul 17, 2021
a02d435
add error code 170007
advaith1 Jul 17, 2021
7262260
add other sticker errors
advaith1 Jul 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ Discord uses ids and hashes to render images in the client. These hashes can be
| Application Cover | app-icons/[application_id](#DOCS_RESOURCES_APPLICATION/application-object)/[cover_image](#DOCS_RESOURCES_APPLICATION/application-object).png | PNG, JPEG, WebP |
| Application Asset | app-assets/[application_id](#DOCS_RESOURCES_APPLICATION/application-object)/[asset_id](#DOCS_TOPICS_GATEWAY/activity-object-activity-assets).png | PNG, JPEG, WebP |
| Achievement Icon | app-assets/[application_id](#DOCS_RESOURCES_APPLICATION/application-object)/achievements/[achievement_id](#DOCS_GAME_SDK_ACHIEVEMENTS/data-models-user-achievement-struct)/icons/[icon_hash](#DOCS_GAME_SDK_ACHIEVEMENTS/data-models-user-achievement-struct).png | PNG, JPEG, WebP |
| Sticker Pack Banner | app-assets/710982414301790216/store/[sticker_pack_banner_asset_id](#DOCS_RESOURCES_STICKER/sticker-pack-object).png | PNG, JPEG, WebP |
advaith1 marked this conversation as resolved.
Show resolved Hide resolved
| Team Icon | team-icons/[team_id](#DOCS_TOPICS_TEAMS/team-object)/[team_icon](#DOCS_TOPICS_TEAMS/team-object).png | PNG, JPEG, WebP |

\* In the case of endpoints that support GIFs, the hash will begin with `a_` if it is available in GIF format. (example: `a_1269e74af4df7417b13759eae50c83dc`)
Expand Down
32 changes: 3 additions & 29 deletions docs/resources/Channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,11 @@ 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) |
| stickers? | array of [sticker](#DOCS_RESOURCES_STICKER/sticker-object) 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/) |
| 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 |
| 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 |

\* 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 @@ -333,32 +333,6 @@ 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 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 | for guild stickers, a unicode emoji representing the sticker's expression. for nitro stickers, a comma-separated list of related expressions. |
| asset\* | string | **Deprecated** previously the sticker asset hash, now an empty string |
| format_type | integer | [type of sticker format](#DOCS_RESOURCES_CHANNEL/message-object-message-sticker-format-types) |
| available? | boolean | whether or not the sticker is available |
| guild_id? | snowflake | id of the guild that owns this sticker |
| user? | [user](#DOCS_RESOURCES_USER/user-object) object | the user that uploaded the sticker |
| sort_value? | integer | a sticker's sort order within a pack |

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

###### Message Sticker Format Types

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


###### Example Message

Expand Down
6 changes: 3 additions & 3 deletions docs/resources/Emoji.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Returns an [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) object for the given guil

## Create Guild Emoji % POST /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/emojis

Create a new emoji for the guild. Requires the `MANAGE_EMOJIS` permission. Returns the new [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) object on success. Fires a [Guild Emojis Update](#DOCS_TOPICS_GATEWAY/guild-emojis-update) Gateway event.
Create a new emoji for the guild. Requires the `MANAGE_EMOJIS_AND_STICKERS` permission. Returns the new [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) object on success. Fires a [Guild Emojis Update](#DOCS_TOPICS_GATEWAY/guild-emojis-update) Gateway event.

> warn
> Emojis and animated emojis have a maximum file size of 256kb. Attempting to upload an emoji larger than this limit will fail and return 400 Bad Request and an error message, but not a [JSON status code](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/json).
Expand All @@ -96,7 +96,7 @@ Create a new emoji for the guild. Requires the `MANAGE_EMOJIS` permission. Retur

## Modify Guild Emoji % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/emojis/{emoji.id#DOCS_RESOURCES_EMOJI/emoji-object}

Modify the given emoji. Requires the `MANAGE_EMOJIS` permission. Returns the updated [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) object on success. Fires a [Guild Emojis Update](#DOCS_TOPICS_GATEWAY/guild-emojis-update) Gateway event.
Modify the given emoji. Requires the `MANAGE_EMOJIS_AND_STICKERS` permission. Returns the updated [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) object on success. Fires a [Guild Emojis Update](#DOCS_TOPICS_GATEWAY/guild-emojis-update) Gateway event.

> info
> All parameters to this endpoint are optional.
Expand All @@ -110,4 +110,4 @@ Modify the given emoji. Requires the `MANAGE_EMOJIS` permission. Returns the upd

## Delete Guild Emoji % DELETE /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/emojis/{emoji.id#DOCS_RESOURCES_EMOJI/emoji-object}

Delete the given emoji. Requires the `MANAGE_EMOJIS` permission. Returns `204 No Content` on success. Fires a [Guild Emojis Update](#DOCS_TOPICS_GATEWAY/guild-emojis-update) Gateway event.
Delete the given emoji. Requires the `MANAGE_EMOJIS_AND_STICKERS` permission. Returns `204 No Content` on success. Fires a [Guild Emojis Update](#DOCS_TOPICS_GATEWAY/guild-emojis-update) Gateway event.
5 changes: 3 additions & 2 deletions docs/resources/Guild.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Guilds in Discord represent an isolated collection of users and channels, and ar
| discovery_splash | ?string | [discovery splash hash](#DOCS_REFERENCE/image-formatting); only present for guilds with the "DISCOVERABLE" feature |
| owner? \*\* | boolean | true if [the user](#DOCS_RESOURCES_USER/get-current-user-guilds) is the owner of the guild |
| owner_id | snowflake | id of owner |
| permissions? \*\* | string | total permissions for [the user](#DOCS_RESOURCES_USER/get-current-user-guilds) in the guild (excludes overwrites) |
| region? \*\*\* | ?string | [voice region](#DOCS_RESOURCES_VOICE/voice-region-object) id for the guild (deprecated) |
| permissions? \*\* | string | total permissions for [the user](#DOCS_RESOURCES_USER/get-current-user-guilds) in the guild (excludes overwrites) |
| region? \*\*\* | ?string | [voice region](#DOCS_RESOURCES_VOICE/voice-region-object) id for the guild (deprecated) |
| afk_channel_id | ?snowflake | id of afk channel |
| afk_timeout | integer | afk timeout in seconds |
| widget_enabled? | boolean | true if the server widget is enabled |
Expand Down Expand Up @@ -57,6 +57,7 @@ Guilds in Discord represent an isolated collection of users and channels, and ar
| welcome_screen? | [welcome screen](#DOCS_RESOURCES_GUILD/welcome-screen-object) object | the welcome screen of a Community guild, shown to new members, returned in an [Invite](#DOCS_RESOURCES_INVITE/invite-object)'s guild object |
| nsfw_level | integer | [guild NSFW level](#DOCS_RESOURCES_GUILD/guild-object-guild-nsfw-level) |
| stage_instances? \* | array of [stage instance](#DOCS_RESOURCES_STAGE_INSTANCE/stage-instance-object) objects | Stage instances in the guild |
| stickers? | array of [sticker](#DOCS_RESOURCES_STICKER/sticker-object) objects | custom guild stickers |

** \* These fields are only sent within the [GUILD_CREATE](#DOCS_TOPICS_GATEWAY/guild-create) event **

Expand Down