Skip to content

Commit 552321e

Browse files
committed
Droid - Document shared client theme
1 parent ad6d3a0 commit 552321e

File tree

1 file changed

+40
-2
lines changed

1 file changed

+40
-2
lines changed

discord/developers/docs/resources/message.mdx

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ An app will receive empty values in the `content`, `embeds`, `attachments`, and
6060
| resolved? | [resolved](/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure) data | data for users, members, channels, and roles referenced in this message |
6161
| poll? \[2\] | [poll](/developers/docs/resources/poll#poll-object) object | A poll! |
6262
| call? | [message call](/developers/docs/resources/message#message-call-object) object | the call associated with the message |
63+
| shared_client_theme? | [shared client theme](/developers/docs/resources/message#shared-client-theme-object) object | the custom client-side theme shared via the message |
6364

6465
\[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.
6566

@@ -808,6 +809,42 @@ Any entities whose id is included can be mentioned. Do note the API will silentl
808809
| pinned_at | ISO8601 timestamp | the time the message was pinned |
809810
| message | [message](/developers/docs/resources/message#message-object) object | the pinned message |
810811

812+
### Shared Client Theme Object
813+
814+
<ManualAnchor id="shared-client-theme-object-shared-client-theme-object-struture" />
815+
###### Shared Client Theme Object Struture
816+
817+
| Field | Type | Description |
818+
|----------------|--------------------------------------------------------------------|--------------------------------------------------------|
819+
| colors | array of strings | the hexadecimal-encoded colors of the theme (max of 5) |
820+
| gradient_angle | integer | the direction of the theme's colors (max of 360) |
821+
| base_mix | integer | the intensity of the theme's colors (max of 100) |
822+
| base_theme? | ?[base theme](/developers/docs/resources/message#base-theme-types) | the mode of the theme |
823+
824+
<ManualAnchor id="base-theme-types" />
825+
###### Base Theme Types
826+
827+
| Type | Value |
828+
|----------|-------|
829+
| DARK | 1 |
830+
| LIGHT | 2 |
831+
| DARKER | 3 |
832+
| MIDNIGHT | 4 |
833+
834+
<ManualAnchor id="example-shared-client-theme" />
835+
###### Example Shared Client Theme
836+
837+
```json
838+
{
839+
"shared_client_theme": {
840+
"colors": ["5865F2", "7258F2", "9858F2", "BE58F2", "E558F2"],
841+
"gradient_angle": 0,
842+
"base_mix": 58,
843+
"base_theme": 1
844+
}
845+
}
846+
```
847+
811848
## Get Channel Messages
812849
<Route method="GET">/channels/[\{channel.id\}](/developers/docs/resources/channel#channel-object)/messages</Route>
813850

@@ -881,10 +918,11 @@ Files must be attached using a `multipart/form-data` body as described in [Uploa
881918
| flags?\*\* | integer | [Message flags](/developers/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) |
882919
| 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. |
883920
| poll? | [poll](/developers/docs/resources/poll#poll-create-request-object) request object | A poll! |
921+
| shared_client_theme? | [shared client theme object](/developers/docs/resources/message#shared-client-theme-object) | The custom client-side theme to share via the message |
884922

885-
\* At least one of `content`, `embeds`, `sticker_ids`, `components`, `files[n]`, or `poll` is required. When forwarding a message, only `message_reference` is required.
923+
\* 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.
886924

887-
\*\* 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.
925+
\*\* 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.
888926

889927
<ManualAnchor id="create-message-example-request-body-application/json" />
890928
###### Example Request Body (application/json)

0 commit comments

Comments
 (0)