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 1 commit
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
101 changes: 101 additions & 0 deletions docs/resources/Sticker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Sticker Resource

### Sticker Object

Represents a sticker that can be sent in messages. The URL for fetching sticker assets is currently private.

###### Sticker Structure

| Field | Type | Description |
| ----------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| id | snowflake | id of the sticker |
| pack_id? | snowflake | for standard stickers, id of the pack the sticker is from |
| name | string | name of the sticker |
| description | string | description of the sticker |
advaith1 marked this conversation as resolved.
Show resolved Hide resolved
| tags | string | for guild stickers, the name of a unicode emoji representing the sticker's expression. for standard stickers, a comma-separated list of related expressions. |
advaith1 marked this conversation as resolved.
Show resolved Hide resolved
| asset | string | **Deprecated** previously the sticker asset hash, now an empty string |
| type | integer | [type of sticker](#DOCS_RESOURCES_STICKER/sticker-object-sticker-types) |
| format_type | integer | [type of sticker format](#DOCS_RESOURCES_STICKER/sticker-object-sticker-format-types) |
| available? | boolean | whether or not the guild 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 guild sticker |
advaith1 marked this conversation as resolved.
Show resolved Hide resolved
| sort_value? | integer | a standard sticker's sort order within a pack |

###### Sticker Types

| Type | Value | Description |
| -------- | ----- | ----------------------------------------------------------------------------- |
| STANDARD | 1 | an official sticker in a pack, part of Nitro or in a removed purchasable pack |
| GUILD | 2 | a sticker uploaded to a Boosted guild for the guild's members |

###### Sticker Format Types

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

###### Example Sticker

```json
{
"id": "749054660769218631",
"name": "Wave",
"tags": "wumpus, hello, sup, hi, oi, heyo, heya, yo, greetings, greet, welcome, wave, :wave, :hello, :hi, :hey, hey, \ud83d\udc4b, \ud83d\udc4b\ud83c\udffb, \ud83d\udc4b\ud83c\udffc, \ud83d\udc4b\ud83c\udffd, \ud83d\udc4b\ud83c\udffe, \ud83d\udc4b\ud83c\udfff, goodbye, bye, see ya, later, laterz, cya",
"type": 1,
"format_type": 3,
"description": "Wumpus waves hello",
"asset": "",
"pack_id": "847199849233514549",
"sort_value": 12
}
```

### Sticker Pack Object

Represents a pack of standard stickers.

###### Sticker Structure
advaith1 marked this conversation as resolved.
Show resolved Hide resolved

| Field | Type | Description |
| ---------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------- |
| id | snowflake | id of the sticker pack |
| stickers | array of [sticker](#DOCS_RESOURCES_STICKER/sticker-object) objects | the stickers in the pack |
| name | string | name of the sticker pack |
| sku_id | snowflake | id of the pack's SKU |
| cover_sticker_id | snowflake | id of a sticker in the pack which is shown as the pack's icon |
advaith1 marked this conversation as resolved.
Show resolved Hide resolved
| description | string | description of the sticker pack |
| banner_asset_id | snowflake | id of the sticker pack's [banner image](#DOCS_REFERENCE/image-formatting) |

###### Example Sticker Pack

```json
{
"id": "847199849233514549",
"stickers": [],
"name": "Wumpus Beyond",
"sku_id": "847199849233514547",
"cover_sticker_id": "749053689419006003",
"description": "Say hello to Wumpus!",
"banner_asset_id": "761773777976819732"
}
```

## List Nitro Sticker Packs % GET /sticker-packs

Returns the list of sticker packs available to Nitro subscribers.

###### Response Structure

| Field | Type |
advaith1 marked this conversation as resolved.
Show resolved Hide resolved
| ------------- | ---------------------------------------------------------------------------- |
| sticker_packs | array of [sticker pack](#DOCS_RESOURCES_STICKER/sticker-pack-object) objects |

## List Guild Stickers % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/stickers

Returns an array of [sticker](#DOCS_RESOURCES_STICKER/sticker-object) objects for the given guild.

## Get Guild Sticker % GET /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/stickers/{sticker.id#DOCS_RESOURCES_STICKER/sticker-object}

Returns a [sticker](#DOCS_RESOURCES_STICKER/sticker-object) object for the given guild and sticker IDs.
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 @@ -134,6 +134,7 @@ Along with the HTTP error code, our API can also return more detailed error code
| 10036 | Unknown redistributable |
| 10038 | Unknown gift code |
| 10057 | Unknown guild template |
| 10060 | Unknown sticker |
| 10062 | Unknown interaction |
| 10063 | Unknown application command |
| 10066 | Unknown application command permissions |
Expand Down