-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Stickers documentation #2155
Conversation
Any documentation for CDN? We were discussing about the CDN URLs earlier in the Discord API server and discovered that |
Error code 50081 might be worth documenting as well. Not sure since bots can't use stickers. |
looks like bots can also access
and when bots try to send stickers in a message by including |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple nits then LGTM.
It's worth adding the JSON error code to this table: https://discord.com/developers/docs/topics/opcodes-and-status-codes#json-json-error-codes
And also documenting the CDN URL for stickers here: https://discord.com/developers/docs/reference#image-formatting-cdn-endpoints
docs/resources/Channel.md
Outdated
@@ -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_RESOURCES_CHANNEL/message-sticker-structure) objects | the stickers sent with the message | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be #DOCS_RESOURCE_CHANNEL/message-object-message-sticker-structure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also might be worth saying in the description that bots can only receive stickers, and not send them
Bots don't need to access the directory layout so we can leave it undocumented. The team can decide if they wanna lock down the route or not. But the error code is worth documenting. There's no ETA on bots sending stickers right now. It's a bit complex because of the necessity of entitlements to send stickers, and since bots can't "buy" things, they can't have an entitlement to send a sticker. Feature request heard :) But probably not a thing in any near future unless it gets reprioritized. |
docs/resources/Channel.md
Outdated
@@ -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 recieve messages with stickers, not send) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| stickers? | array of [sticker](#DOCS_RESOURCE_CHANNEL/message-object-message-sticker-structure) objects | the stickers sent with the message (bots currently can only recieve messages with stickers, not send) | | |
| 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) | |
docs/resources/Channel.md
Outdated
| preview_asset\* | ?string | sticker preview asset hash | | ||
| format_type | integer | [type of sticker format](#DOCS_RESOURCES_CHANNEL/message-object-sticker-format-types) | | ||
|
||
\* Sticker asset hashes currently cannot be resolved to an image. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't seem true though? at least for png/apng stickers; https://cdn.discordapp.com/stickers/748293547572330607/067a41f0df36a1d0925078ded077824c.png?size=512 is the image from the id
and asset
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@puddi Let's instead just say that the URL for fetching them is private
@advaith1 It's possible, but we don't want to yet document it. There's lots of undocumented but technically available things within our API. In this case, where we host stuff could be subject to change (since we have two URLs that resolve there right now, lol) and we don't want everyone scraping stickers yet outside of our experiment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@msciotti comment updated!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to add a small bit in Changelog.md
saying these fields have been added. Otherwise LGTM
adding a new field to the messages object for stickers, with new tables to explain the actual new type of stickers object (joint work w/ @jfurrow)