Skip to content

Commit 2ea768d

Browse files
committed
Droid - Document shared client theme
1 parent 0193334 commit 2ea768d

File tree

1 file changed

+37
-2
lines changed

1 file changed

+37
-2
lines changed

docs/resources/message.mdx

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ An app will receive empty values in the `content`, `embeds`, `attachments`, and
5656
| resolved? | [resolved](/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure) data | data for users, members, channels, and roles in the message's [auto-populated select menus](/docs/interactions/receiving-and-responding#interaction-response-object-modal) |
5757
| poll? \[2\] | [poll](/docs/resources/poll#poll-object) object | A poll! |
5858
| call? | [message call](/docs/resources/message#message-call-object) object | the call associated with the message |
59+
| shared_client_theme? | [shared client theme](/docs/resources/message#shared-client-theme-object) object | the custom client-side theme shared via the message |
5960

6061
\[1\] 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.
6162

@@ -766,6 +767,39 @@ Any entities whose id is included can be mentioned. Do note the API will silentl
766767
| pinned_at | ISO8601 timestamp | the time the message was pinned |
767768
| message | [message](/docs/resources/message#message-object) object | the pinned message |
768769

770+
### Shared Client Theme Object
771+
772+
###### Shared Client Theme Object Struture
773+
774+
| Field | Type | Description |
775+
|----------------|---------------------------------------------------------|--------------------------------------------------------|
776+
| colors | array of strings | the hexadecimal-encoded colors of the theme (max of 5) |
777+
| gradient_angle | integer | the direction of the theme's colors (max of 360) |
778+
| base_mix | integer | the intensity of the theme's colors (max of 100) |
779+
| base_theme? | ?[base theme](/docs/resources/message#base-theme-types) | the base theme of the theme |
780+
781+
###### Base Theme Types
782+
783+
| Type | Value |
784+
|----------|-------|
785+
| DARK | 1 |
786+
| LIGHT | 2 |
787+
| DARKER | 3 |
788+
| MIDNIGHT | 4 |
789+
790+
###### Example Shared Client Theme
791+
792+
```json
793+
{
794+
"shared_client_theme": {
795+
"colors": ["5865F2", "7258F2", "9858F2", "BE58F2", "E558F2"],
796+
"gradient_angle": 0,
797+
"base_mix": 58,
798+
"base_theme": 1
799+
}
800+
}
801+
```
802+
769803
## Get Channel Messages
770804
<Route method="GET">/channels/[\{channel.id\}](/docs/resources/channel#channel-object)/messages</Route>
771805

@@ -836,10 +870,11 @@ Files must be attached using a `multipart/form-data` body as described in [Uploa
836870
| flags?\*\* | integer | [Message flags](/docs/resources/message#message-object-message-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) (only `SUPPRESS_EMBEDS`, `SUPPRESS_NOTIFICATIONS`, `IS_VOICE_MESSAGE`, and `IS_COMPONENTS_V2` can be set) |
837871
| enforce_nonce? | boolean | If true and nonce is present, it will be checked for uniqueness in the past few minutes. If another message was created by the same author with the same nonce, that message will be returned and no new message will be created. |
838872
| poll? | [poll](/docs/resources/poll#poll-create-request-object) request object | A poll! |
873+
| shared_client_theme? | [shared client theme object](/docs/resources/message#shared-client-theme-object) | The custom client-side theme to share via the message |
839874

840-
\* At least one of `content`, `embeds`, `sticker_ids`, `components`, `files[n]`, or `poll` is required. When forwarding a message, only `message_reference` is required.
875+
\* At least one of `content`, `embeds`, `sticker_ids`, `components`, `files[n]`, `poll` or `shared_client_theme` is required. When forwarding a message, only `message_reference` is required.
841876

842-
\*\* When the flag `IS_COMPONENTS_V2` is set, the message can only contain `components`. Providing `content`, `embeds`, `sticker_ids`, `files[n]`, or `poll` will fail with a 400 BAD REQUEST response.
877+
\*\* When the flag `IS_COMPONENTS_V2` is set, the message can only contain `components`. Providing `content`, `embeds`, `sticker_ids`, `files[n]`, `poll` or `shared_client_theme` will fail with a 400 BAD REQUEST response.
843878

844879
###### Example Request Body (application/json)
845880

0 commit comments

Comments
 (0)