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 URL length limits #6531

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion docs/interactions/Message_Components.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Buttons are interactive components that render in messages. They can be clicked
| label? | string | Text that appears on the button; max 80 characters |
| emoji? | partial [emoji](#DOCS_RESOURCES_EMOJI/emoji-object) | `name`, `id`, and `animated` |
| custom_id? | string | Developer-defined identifier for the button; max 100 characters |
| url? | string | URL for link-style buttons |
| url? | string | URL for link-style buttons; max 512 characters |
| disabled? | boolean | Whether the button is disabled (defaults to `false`) |

Buttons come in a variety of styles to convey different types of actions. These styles also define what fields are valid for a button.
Expand Down
19 changes: 10 additions & 9 deletions docs/resources/Channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -785,15 +785,16 @@ To facilitate showing rich content, rich embeds do not follow the traditional li

All of the following limits are measured inclusively. Leading and trailing whitespace characters are not included (they are trimmed automatically).

| Field | Limit |
|----------------------------------------------------------------------------|--------------------------------------------------------------------------------------|
| title | 256 characters |
| description | 4096 characters |
| fields | Up to 25 [field](#DOCS_RESOURCES_CHANNEL/embed-object-embed-field-structure) objects |
| [field.name](#DOCS_RESOURCES_CHANNEL/embed-object-embed-field-structure) | 256 characters |
| [field.value](#DOCS_RESOURCES_CHANNEL/embed-object-embed-field-structure) | 1024 characters |
| [footer.text](#DOCS_RESOURCES_CHANNEL/embed-object-embed-footer-structure) | 2048 characters |
| [author.name](#DOCS_RESOURCES_CHANNEL/embed-object-embed-author-structure) | 256 characters |
| Field | Limit |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|
| title | 256 characters |
| description | 4096 characters |
| url, [author.url](#DOCS_RESOURCES_CHANNEL/embed-object-embed-author-structure), [author.icon_url](#DOCS_RESOURCES_CHANNEL/embed-object-embed-author-structure), [footer.icon_url](#DOCS_RESOURCES_CHANNEL/embed-object-embed-footer-structure), [image.url](#DOCS_RESOURCES_CHANNEL/embed-object-embed-image-structure), [thumbnail.url](#DOCS_RESOURCES_CHANNEL/embed-object-embed-thumbnail-structure) | 2048 characters |
| fields | Up to 25 [field](#DOCS_RESOURCES_CHANNEL/embed-object-embed-field-structure) objects |
| [field.name](#DOCS_RESOURCES_CHANNEL/embed-object-embed-field-structure) | 256 characters |
| [field.value](#DOCS_RESOURCES_CHANNEL/embed-object-embed-field-structure) | 1024 characters |
| [footer.text](#DOCS_RESOURCES_CHANNEL/embed-object-embed-footer-structure) | 2048 characters |
| [author.name](#DOCS_RESOURCES_CHANNEL/embed-object-embed-author-structure) | 256 characters |

Additionally, the combined sum of characters in all `title`, `description`, `field.name`, `field.value`, `footer.text`, and `author.name` fields across all embeds attached to a message must not exceed 6000 characters. Violating any of these constraints will result in a `Bad Request` response.

Expand Down
14 changes: 7 additions & 7 deletions docs/topics/Gateway_Events.md
Original file line number Diff line number Diff line change
Expand Up @@ -1024,14 +1024,14 @@ Active sessions are indicated with an "online", "idle", or "dnd" string per plat

| Field | Type | Description |
|-----------------|--------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|
| name | string | Activity's name |
| name | string | Activity's name (max 128 characters) |
| type | integer | [Activity type](#DOCS_TOPICS_GATEWAY_EVENTS/activity-object-activity-types) |
| url? | ?string | Stream URL, is validated when type is 1 |
| url? | ?string | Stream URL, is validated when type is 1 (max 512 characters) |
| created_at | integer | Unix timestamp (in milliseconds) of when the activity was added to the user's session |
| timestamps? | [timestamps](#DOCS_TOPICS_GATEWAY_EVENTS/activity-object-activity-timestamps) object | Unix timestamps for start and/or end of the game |
| application_id? | snowflake | Application ID for the game |
| details? | ?string | What the player is currently doing |
| state? | ?string | User's current party status, or text used for a custom status |
| state? | ?string | User's current party status, or text used for a custom status (max 128 characters) |
| emoji? | ?[emoji](#DOCS_TOPICS_GATEWAY_EVENTS/activity-object-activity-emoji) object | Emoji used for a custom status |
| party? | [party](#DOCS_TOPICS_GATEWAY_EVENTS/activity-object-activity-party) object | Information for the current party of the player |
| assets? | [assets](#DOCS_TOPICS_GATEWAY_EVENTS/activity-object-activity-assets) object | Images for the presence and their hover texts |
Expand Down Expand Up @@ -1125,10 +1125,10 @@ To use an external image via media proxy, specify the URL as the field's value w

When received over the gateway, the `buttons` field is an array of strings, which are the button labels. Bots cannot access a user's activity button URLs. When sending, the `buttons` field must be an array of the below object:

| Field | Type | Description |
|-------|--------|--------------------------------------------------------|
| label | string | Text shown on the button (1-32 characters) |
| url | string | URL opened when clicking the button (1-512 characters) |
| Field | Type | Description |
|-------|--------|----------------------------------------------------------|
| label | string | Text shown on the button (max 32 characters) |
| url | string | URL opened when clicking the button (max 512 characters) |

###### Example Activity

Expand Down