Skip to content

Commit 1d9f960

Browse files
add warning about v2 add_component
1 parent 313bebb commit 1d9f960

File tree

1 file changed

+6
-6
lines changed
  • docpages/example_programs/interactions_and_components/components

1 file changed

+6
-6
lines changed

docpages/example_programs/interactions_and_components/components/components_v2.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ any changes in D++. If you want to use the new style of components you may do so
66
Components are attached to any message or interaction reply, via the dpp::message::add_component() or dpp::message::add_component_v2() function. You must also be sure to set the flag
77
dpp::m_using_components_v2 on the message to allow the new features.
88

9-
You can have a maximum of 10 top level components per message. The maximum number of nested components is 30.
10-
11-
The total length of the entire message, including all components within and the content of those components, is 4000 UTF-8 characters.
12-
139
When using components v2, the following limits apply which do not apply with components v1 or traditional embeds:
1410

15-
* Setting the message content or embeds will not be allowed (components v2 replaces the functionality)
11+
* Setting the message `content` or `embeds` will not be allowed (components v2 replaces the functionality)
12+
* You can have a maximum of 10 top level components per message. The maximum number of nested components is 30.
1613
* Audio files are not supported at present
1714
* Text preview for text/plain files is not supported
1815
* URLs will not have embeds generated for them
16+
* The total length of the entire message, including all components within and the content of those components, is 4000 UTF-8 characters.
17+
18+
Here is a detailed example of how to create components v2 replies.
1919

20-
Here is a detailed example of how to create components v2 replies:
20+
\warning Please note that where you would use add_component() previously, you **should** use add_component_v2() (on component or message objects). This is because the v2 version will not automatically add action rows, which is a limitation which has been removed in version 2 but is still required for version 1.
2121

2222
\include{cpp} components_v2.cpp
2323

0 commit comments

Comments
 (0)