You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/components/overview.mdx
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,8 +19,9 @@ All components are customizable and can be organized using layout components to
19
19
20
20
To use components, messages must be sent with the `IS_COMPONENTS_V2` flag (`1<<15`). Note that using this flag disables traditional content and embeds - all content must be sent as components instead.
21
21
22
-
> info
23
-
> [Legacy message component behavior](/docs/components/reference#legacy-message-component-behavior) will **not** be deprecated and will continue to be available to your apps on a message-by-message basis. However, we recommend using the new components for new projects and features.
22
+
:::info
23
+
[Legacy message component behavior](/docs/components/reference#legacy-message-component-behavior) will **not** be deprecated and will continue to be available to your apps on a message-by-message basis. However, we recommend using the new components for new projects and features.
Copy file name to clipboardExpand all lines: docs/components/reference.mdx
+30-20Lines changed: 30 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,8 +16,9 @@ To use these components, you need to send the [message flag](/docs/resources/mes
16
16
- Attachments won't show by default - they must be exposed through components
17
17
- The `poll` and `stickers` fields are disabled
18
18
19
-
> info
20
-
> [Legacy component behavior](/docs/components/reference#legacy-message-component-behavior) will continue to work but provide less flexibility and control over the message layout.
19
+
:::info
20
+
[Legacy component behavior](/docs/components/reference#legacy-message-component-behavior) will continue to work but provide less flexibility and control over the message layout.
21
+
:::
21
22
22
23
For a practical guide on implementing these components, see our [Using Message Components](/docs/components/using-message-components) and [Using Modal Components](/docs/components/using-modal-components) documentation.
23
24
@@ -485,8 +486,9 @@ String Selects must be placed inside an [Action Row](/docs/components/reference#
485
486
486
487
The `resolved` object is included in interaction payloads for user, role, mentionable, and channel select menu components. `resolved` contains a nested object with additional details about the selected options with the key of the resource type—`users`, `roles`, `channels`, and `members`.
487
488
488
-
> info
489
-
> `members` and `users` may both be present in the `resolved` object when a user is selected (in either a [user select](/docs/components/reference#user-select) or [mentionable select](/docs/components/reference#mentionable-select)).
489
+
:::info
490
+
`members` and `users` may both be present in the `resolved` object when a user is selected (in either a [user select](/docs/components/reference#user-select) or [mentionable select](/docs/components/reference#mentionable-select)).
491
+
:::
490
492
491
493
###### Example Resolved Object
492
494
@@ -823,8 +825,9 @@ A Section is a top-level layout component that allows you to join text contextua
823
825
824
826
Sections are only available in messages.
825
827
826
-
> info
827
-
> To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags)`1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
828
+
:::info
829
+
To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags)`1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
830
+
:::
828
831
829
832
###### Section Structure
830
833
@@ -835,8 +838,9 @@ Sections are only available in messages.
835
838
| components | array of [text display components](/docs/components/reference#text-display)| One to three text components |
836
839
| accessory |[thumbnail component](/docs/components/reference#thumbnail) or [button components](/docs/components/reference#button)| A thumbnail or a button component, with a future possibility of adding more compatible components |
837
840
838
-
> info
839
-
> Don't hardcode `components` to contain only text components. We may add other components in the future. Similarly, `accessory` may be expanded to include other components in the future.
841
+
:::info
842
+
Don't hardcode `components` to contain only text components. We may add other components in the future. Similarly, `accessory` may be expanded to include other components in the future.
843
+
:::
840
844
841
845
###### Example
842
846
@@ -876,8 +880,9 @@ A Text Display is a top-level content component that allows you to add text to y
876
880
877
881
Text Displays are only available in messages.
878
882
879
-
> info
880
-
> To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags)`1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
883
+
:::info
884
+
To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags)`1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
885
+
:::
881
886
882
887
###### Text Display Structure
883
888
@@ -906,8 +911,9 @@ A Thumbnail is a content component that is a small image only usable as an acces
906
911
907
912
Thumbnails are only available in messages as an accessory in a [section](/docs/components/reference#section).
908
913
909
-
> info
910
-
> To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags)`1 << 15` (IS_COMPONENTS_V2), which can be activated on a per-message basis.
914
+
:::info
915
+
To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags)`1 << 15` (IS_COMPONENTS_V2), which can be activated on a per-message basis.
916
+
:::
911
917
912
918
###### Thumbnail Structure
913
919
@@ -929,8 +935,9 @@ A Media Gallery is a top-level content component that allows you to display 1-10
929
935
930
936
Media Galleries are only available in messages.
931
937
932
-
> info
933
-
> To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags)`1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
938
+
:::info
939
+
To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags)`1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
940
+
:::
934
941
935
942
###### Media Gallery Structure
936
943
@@ -982,8 +989,9 @@ Media Galleries are only available in messages.
982
989
983
990
A File is a top-level component that allows you to display an uploaded file as an attachment to the message and reference it in the component. This is similar to the `embeds` field of a message but allows you to control the layout of your message by using this anywhere as a component. Files are only available in messages.
984
991
985
-
> info
986
-
> To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags)`1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
992
+
:::info
993
+
To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags)`1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
994
+
:::
987
995
988
996
###### File Structure
989
997
@@ -1033,8 +1041,9 @@ A Separator is a top-level layout component that adds vertical padding and visua
1033
1041
1034
1042
Separators are only available in messages.
1035
1043
1036
-
> info
1037
-
> To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags)`1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
1044
+
:::info
1045
+
To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags)`1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
1046
+
:::
1038
1047
1039
1048
###### Separator Structure
1040
1049
@@ -1073,8 +1082,9 @@ A Container is a top-level layout component that holds up to 10 components. Cont
1073
1082
1074
1083
Containers are only available in messages.
1075
1084
1076
-
> info
1077
-
> To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags)`1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
1085
+
:::info
1086
+
To use this component, you need to send the [message flag](/docs/resources/message#message-object-message-flags)`1 << 15` (IS_COMPONENTS_V2) which can be activated on a per-message basis.
Copy file name to clipboardExpand all lines: docs/components/using-modal-components.mdx
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,9 @@ sidebar_label: Using Modal Components
8
8
9
9
Modal components are a great way to collect freeform information from your users.
10
10
11
-
> info
12
-
> Currently, only [Text Input](/docs/components/reference#text-input) fields are supported in a modal, and each one must be placed in an [Action Row](/docs/components/reference#action-row).
11
+
:::info
12
+
Currently, only [Text Input](/docs/components/reference#text-input) fields are supported in a modal, and each one must be placed in an [Action Row](/docs/components/reference#action-row).
0 commit comments