-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclassdpp_1_1component.html
1456 lines (1313 loc) · 97.6 KB
/
classdpp_1_1component.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<meta property="og:title" content="dpp::component Class Reference - D++ - The lightweight C++ Discord API Library">
<meta property="og:description" content="A lightweight C++ Discord API library supporting the entire Discord API, including Slash Commands, Voice/Audio, Sharding, Clustering and more!">
<meta name="description" content="dpp::component Class Reference - D++ - A lightweight C++ Discord API library supporting the entire Discord API, including Slash Commands, Voice/Audio, Sharding, Clustering and more!">
<meta property="og:image" content="https://dpp.dev/DPP-Logo.png">
<meta property="og:url" content="https://dpp.dev/">
<meta property="og:type" content="website">
<meta property="twitter:title" content="dpp::component Class Reference - D++ - The lightweight C++ Discord API Library">
<title>dpp::component Class Reference - D++ - The lightweight C++ Discord API Library</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="style.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<script>
setTimeout(function() {
$("#main-menu").html($("#main-menu").html() + "<li><select name='vsv' onchange='window.location.href=this.options[this.selectedIndex].value'><option value='/'>master</option><option value='/10.0.35/'>10.0.35</option><option value='/10.0.34/'>10.0.34</option><option value='/10.0.33/'>10.0.33</option><option value='/10.0.32/'>10.0.32</option><option value='/10.0.31/'>10.0.31</option><option value='/10.0.30/'>10.0.30</option><option value='/10.0.29/'>10.0.29</option><option value='/10.0.28/'>10.0.28</option><option value='/10.0.27/'>10.0.27</option><option value='/10.0.26/'>10.0.26</option><option value='/10.0.25/'>10.0.25</option><option value='/10.0.24/'>10.0.24</option><option value='/10.0.23/'>10.0.23</option><option value='/10.0.22/'>10.0.22</option><option value='/10.0.21/'>10.0.21</option><option value='/10.0.20/'>10.0.20</option><option value='/10.0.19/'>10.0.19</option><option value='/10.0.18/'>10.0.18</option><option value='/10.0.17/'>10.0.17</option><option value='/10.0.16/'>10.0.16</option><option value='/10.0.15/'>10.0.15</option><option value='/10.0.14/'>10.0.14</option><option value='/10.0.13/'>10.0.13</option><option value='/10.0.12/'>10.0.12</option><option value='/10.0.11/'>10.0.11</option><option value='/10.0.10/'>10.0.10</option><option value='/10.0.9/'>10.0.9</option><option value='/10.0.8/'>10.0.8</option><option value='/10.0.7/'>10.0.7</option><option value='/10.0.6/'>10.0.6</option><option value='/10.0.5/'>10.0.5</option><option value='/10.0.4/'>10.0.4</option><option value='/10.0.3/'>10.0.3</option><option value='/10.0.2/'>10.0.2</option><option value='/10.0.1/'>10.0.1</option><option value='/10.0.0/'>10.0.0</option><option value='/9.0.19/'>9.0.19</option><option value='/9.0.18/'>9.0.18</option><option value='/9.0.17/'>9.0.17</option><option value='/9.0.16/'>9.0.16</option><option value='/9.0.15/'>9.0.15</option><option value='/9.0.14/'>9.0.14</option><option value='/9.0.13/'>9.0.13</option><option value='/9.0.12/'>9.0.12</option><option value='/9.0.11/'>9.0.11</option><option value='/9.0.10/'>9.0.10</option><option value='/9.0.9/'>9.0.9</option><option value='/9.0.8/'>9.0.8</option><option value='/9.0.7/'>9.0.7</option><option value='/9.0.6/'>9.0.6</option><option value='/9.0.5/'>9.0.5</option><option value='/9.0.4/'>9.0.4</option><option value='/9.0.3/'>9.0.3</option><option value='/9.0.2/'>9.0.2</option><option value='/9.0.1/'>9.0.1</option><option value='/9.0.0/'>9.0.0</option><option value='/1.0.2/'>1.0.2</option><option value='/1.0.1/'>1.0.1</option><option value='/1.0.0/'>1.0.0</option></select></li>");
}, 500);
</script>
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td id="projectlogo"><img alt="Logo" src="DPP-Logo.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">D++ (DPP)
</div>
<div id="projectbrief">C++ Discord API Bot Library</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<label for="MSearchField" style="display: none">Search</label>
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(document).ready(function(){initNavTree('classdpp_1_1component.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-attribs">Public Attributes</a> |
<a href="#pro-methods">Protected Member Functions</a> |
<a href="#friends">Friends</a> |
<a href="classdpp_1_1component-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">dpp::component Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Represents the component object. A component is a clickable button or drop down list within a discord message, where the buttons emit on_button_click events when the user interacts with them.
<a href="classdpp_1_1component.html#details">More...</a></p>
<p><code>#include <message.h></code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
<img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for dpp::component:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><iframe scrolling="no" frameborder="0" src="classdpp_1_1component__inherit__graph.svg" width="211" height="218"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
<img id="dynsection-1-trigger" src="closed.png" alt="+"/> Collaboration diagram for dpp::component:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="classdpp_1_1component__coll__graph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a69b9e60742f6a1f1622b264cd7712660"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a69b9e60742f6a1f1622b264cd7712660">component</a> ()</td></tr>
<tr class="memdesc:a69b9e60742f6a1f1622b264cd7712660"><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="classdpp_1_1component.html#a69b9e60742f6a1f1622b264cd7712660">More...</a><br /></td></tr>
<tr class="separator:a69b9e60742f6a1f1622b264cd7712660"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a790334ad68b127e95923c5f6cdb727a7"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a790334ad68b127e95923c5f6cdb727a7">~component</a> ()=default</td></tr>
<tr class="memdesc:a790334ad68b127e95923c5f6cdb727a7"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="classdpp_1_1component.html#a790334ad68b127e95923c5f6cdb727a7">More...</a><br /></td></tr>
<tr class="separator:a790334ad68b127e95923c5f6cdb727a7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af83f1098e87ce1dd11e475dfd4740b16"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1component.html">component</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#af83f1098e87ce1dd11e475dfd4740b16">add_channel_type</a> (uint8_t ct)</td></tr>
<tr class="memdesc:af83f1098e87ce1dd11e475dfd4740b16"><td class="mdescLeft"> </td><td class="mdescRight">Add a channel type to include in the channel select component (<a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7a67cb03df6c78061abb9605e50353da0e" title="Select menu for channels.">dpp::cot_channel_selectmenu</a>) <a href="classdpp_1_1component.html#af83f1098e87ce1dd11e475dfd4740b16">More...</a><br /></td></tr>
<tr class="separator:af83f1098e87ce1dd11e475dfd4740b16"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a281e39d6b8c65b1fd301d195a835e703"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1component.html">component</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a281e39d6b8c65b1fd301d195a835e703">set_type</a> (<a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7">component_type</a> ct)</td></tr>
<tr class="memdesc:a281e39d6b8c65b1fd301d195a835e703"><td class="mdescLeft"> </td><td class="mdescRight">Set the type of the component. Button components (type <a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7a98228836af5d0c180cfc05eb1f0bfde9" title="Clickable button.">dpp::cot_button</a>) should always be contained within an action row (type <a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7afd32ce8be4a99a9d84fb4815370a0bf8" title="Action row, a container for other components.">dpp::cot_action_row</a>). As described below, many of the other methods automatically set this to the correct type so usually you should not need to manually call <a class="el" href="classdpp_1_1component.html#a281e39d6b8c65b1fd301d195a835e703" title="Set the type of the component. Button components (type dpp::cot_button) should always be contained wi...">component::set_type()</a>. <a href="classdpp_1_1component.html#a281e39d6b8c65b1fd301d195a835e703">More...</a><br /></td></tr>
<tr class="separator:a281e39d6b8c65b1fd301d195a835e703"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac4c9bd7a5216e4f6e8ac87ea34cf6193"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1component.html">component</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#ac4c9bd7a5216e4f6e8ac87ea34cf6193">set_sku_id</a> (<a class="el" href="classdpp_1_1snowflake.html">dpp::snowflake</a> <a class="el" href="classdpp_1_1sku.html">sku</a>)</td></tr>
<tr class="memdesc:ac4c9bd7a5216e4f6e8ac87ea34cf6193"><td class="mdescLeft"> </td><td class="mdescRight">Set the SKU ID for a premium upsell button This is only valid for premium upsell buttons of type cos_premium. It indicates which premium package to link to when the button is clicked. <a href="classdpp_1_1component.html#ac4c9bd7a5216e4f6e8ac87ea34cf6193">More...</a><br /></td></tr>
<tr class="separator:ac4c9bd7a5216e4f6e8ac87ea34cf6193"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4d2cd2b2c6169c31b4b3e41ce8698afe"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1component.html">component</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a4d2cd2b2c6169c31b4b3e41ce8698afe">set_text_style</a> (<a class="el" href="namespacedpp.html#a284d405e6b10bc80ec459ff2505edbb3">text_style_type</a> ts)</td></tr>
<tr class="memdesc:a4d2cd2b2c6169c31b4b3e41ce8698afe"><td class="mdescLeft"> </td><td class="mdescRight">Set the text style of a text component. <a href="classdpp_1_1component.html#a4d2cd2b2c6169c31b4b3e41ce8698afe">More...</a><br /></td></tr>
<tr class="separator:a4d2cd2b2c6169c31b4b3e41ce8698afe"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a33f254b5ac5a043870cb30efc99fb580"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1component.html">component</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a33f254b5ac5a043870cb30efc99fb580">set_label</a> (std::string_view <a class="el" href="classdpp_1_1component.html#a177a7e35e4b310e2028464787396b1b4">label</a>)</td></tr>
<tr class="memdesc:a33f254b5ac5a043870cb30efc99fb580"><td class="mdescLeft"> </td><td class="mdescRight">Set the label of the component, e.g. button text. For action rows, this field is ignored. Setting the label will auto-set the type to <a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7a98228836af5d0c180cfc05eb1f0bfde9" title="Clickable button.">dpp::cot_button</a>. <a href="classdpp_1_1component.html#a33f254b5ac5a043870cb30efc99fb580">More...</a><br /></td></tr>
<tr class="separator:a33f254b5ac5a043870cb30efc99fb580"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af68cc0f09b37f0cbd4a29b083c701904"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1component.html">component</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#af68cc0f09b37f0cbd4a29b083c701904">set_default_value</a> (std::string_view val)</td></tr>
<tr class="memdesc:af68cc0f09b37f0cbd4a29b083c701904"><td class="mdescLeft"> </td><td class="mdescRight">Set the default value of the text input component. For action rows, this field is ignored. Setting the value will auto-set the type to <a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7a8fdd4137c3888268fad7cab29c7b765b" title="Text input.">dpp::cot_text</a>. <a href="classdpp_1_1component.html#af68cc0f09b37f0cbd4a29b083c701904">More...</a><br /></td></tr>
<tr class="separator:af68cc0f09b37f0cbd4a29b083c701904"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a11d0409aab14e5a4fa19612785d83f2b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1component.html">component</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a11d0409aab14e5a4fa19612785d83f2b">set_url</a> (std::string_view <a class="el" href="classdpp_1_1component.html#a79ad72fb0e31440e8f644e79a5870573">url</a>)</td></tr>
<tr class="memdesc:a11d0409aab14e5a4fa19612785d83f2b"><td class="mdescLeft"> </td><td class="mdescRight">Set the url for <a class="el" href="namespacedpp.html#ad1aac955c38caa8b8581de35d6c432d5a96d13813649e792fc6d88d29b70202d6" title="An external hyperlink to a website, requires url to be set.">dpp::cos_link</a> types. Calling this function sets the style to <a class="el" href="namespacedpp.html#ad1aac955c38caa8b8581de35d6c432d5a96d13813649e792fc6d88d29b70202d6" title="An external hyperlink to a website, requires url to be set.">dpp::cos_link</a> and the type to <a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7a98228836af5d0c180cfc05eb1f0bfde9" title="Clickable button.">dpp::cot_button</a>. <a href="classdpp_1_1component.html#a11d0409aab14e5a4fa19612785d83f2b">More...</a><br /></td></tr>
<tr class="separator:a11d0409aab14e5a4fa19612785d83f2b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a19213be82f2cd18748f669e53e1348a8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1component.html">component</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a19213be82f2cd18748f669e53e1348a8">set_style</a> (<a class="el" href="namespacedpp.html#ad1aac955c38caa8b8581de35d6c432d5">component_style</a> cs)</td></tr>
<tr class="memdesc:a19213be82f2cd18748f669e53e1348a8"><td class="mdescLeft"> </td><td class="mdescRight">Set the style of the component, e.g. button colour. For action rows, this field is ignored. Setting the style will auto-set the type to <a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7a98228836af5d0c180cfc05eb1f0bfde9" title="Clickable button.">dpp::cot_button</a>. <a href="classdpp_1_1component.html#a19213be82f2cd18748f669e53e1348a8">More...</a><br /></td></tr>
<tr class="separator:a19213be82f2cd18748f669e53e1348a8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5b5e20746e11d017569ccc46efd56688"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1component.html">component</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a5b5e20746e11d017569ccc46efd56688">set_id</a> (std::string_view id)</td></tr>
<tr class="memdesc:a5b5e20746e11d017569ccc46efd56688"><td class="mdescLeft"> </td><td class="mdescRight">Set the id of the component. For action rows, this field is ignored. Setting the id will auto-set the type to <a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7a98228836af5d0c180cfc05eb1f0bfde9" title="Clickable button.">dpp::cot_button</a>. <a href="classdpp_1_1component.html#a5b5e20746e11d017569ccc46efd56688">More...</a><br /></td></tr>
<tr class="separator:a5b5e20746e11d017569ccc46efd56688"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a48a2ab72eaf6e58073a1f5dc936877a3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1component.html">component</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a48a2ab72eaf6e58073a1f5dc936877a3">set_disabled</a> (bool disable)</td></tr>
<tr class="memdesc:a48a2ab72eaf6e58073a1f5dc936877a3"><td class="mdescLeft"> </td><td class="mdescRight">Set the component to disabled. Defaults to false on all created components. <a href="classdpp_1_1component.html#a48a2ab72eaf6e58073a1f5dc936877a3">More...</a><br /></td></tr>
<tr class="separator:a48a2ab72eaf6e58073a1f5dc936877a3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad75a96f7fb63cc2721a605e7d61cc477"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1component.html">component</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#ad75a96f7fb63cc2721a605e7d61cc477">set_required</a> (bool require)</td></tr>
<tr class="memdesc:ad75a96f7fb63cc2721a605e7d61cc477"><td class="mdescLeft"> </td><td class="mdescRight">Set if this component is required. Defaults to false on all created components. <a href="classdpp_1_1component.html#ad75a96f7fb63cc2721a605e7d61cc477">More...</a><br /></td></tr>
<tr class="separator:ad75a96f7fb63cc2721a605e7d61cc477"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a520c883895cf9ea91c9ce17f7b11ff52"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1component.html">component</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a520c883895cf9ea91c9ce17f7b11ff52">set_placeholder</a> (std::string_view <a class="el" href="classdpp_1_1component.html#a4fe9d95b2fd61a38269c3368db4c17ce">placeholder</a>)</td></tr>
<tr class="memdesc:a520c883895cf9ea91c9ce17f7b11ff52"><td class="mdescLeft"> </td><td class="mdescRight">Set the placeholder. <a href="classdpp_1_1component.html#a520c883895cf9ea91c9ce17f7b11ff52">More...</a><br /></td></tr>
<tr class="separator:a520c883895cf9ea91c9ce17f7b11ff52"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a39de811904ed62eb0fa2d37be2918503"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1component.html">component</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a39de811904ed62eb0fa2d37be2918503">set_min_values</a> (uint32_t <a class="el" href="classdpp_1_1component.html#a2278f6585edfa07f2b7711aaf31cf5a3">min_values</a>)</td></tr>
<tr class="memdesc:a39de811904ed62eb0fa2d37be2918503"><td class="mdescLeft"> </td><td class="mdescRight">Set the minimum number of items that must be chosen for a select menu. <a href="classdpp_1_1component.html#a39de811904ed62eb0fa2d37be2918503">More...</a><br /></td></tr>
<tr class="separator:a39de811904ed62eb0fa2d37be2918503"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a94aa64e7a19c975953ab40c2b7f34573"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1component.html">component</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a94aa64e7a19c975953ab40c2b7f34573">set_max_values</a> (uint32_t <a class="el" href="classdpp_1_1component.html#a35895913793b44ca33d039e4042afc25">max_values</a>)</td></tr>
<tr class="memdesc:a94aa64e7a19c975953ab40c2b7f34573"><td class="mdescLeft"> </td><td class="mdescRight">Set the maximum number of items that can be chosen for a select menu. <a href="classdpp_1_1component.html#a94aa64e7a19c975953ab40c2b7f34573">More...</a><br /></td></tr>
<tr class="separator:a94aa64e7a19c975953ab40c2b7f34573"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa23287b8b438eb808b2106c50421235b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1component.html">component</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#aa23287b8b438eb808b2106c50421235b">set_min_length</a> (uint32_t min_l)</td></tr>
<tr class="memdesc:aa23287b8b438eb808b2106c50421235b"><td class="mdescLeft"> </td><td class="mdescRight">Set the minimum input length for a text input. <a href="classdpp_1_1component.html#aa23287b8b438eb808b2106c50421235b">More...</a><br /></td></tr>
<tr class="separator:aa23287b8b438eb808b2106c50421235b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3778e0e45c429697f799ca431bb383ad"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1component.html">component</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a3778e0e45c429697f799ca431bb383ad">set_max_length</a> (uint32_t max_l)</td></tr>
<tr class="memdesc:a3778e0e45c429697f799ca431bb383ad"><td class="mdescLeft"> </td><td class="mdescRight">Set the maximum input length for a text input. <a href="classdpp_1_1component.html#a3778e0e45c429697f799ca431bb383ad">More...</a><br /></td></tr>
<tr class="separator:a3778e0e45c429697f799ca431bb383ad"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad39a99a7bb31f43bf3d2764aa3c24243"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1component.html">component</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#ad39a99a7bb31f43bf3d2764aa3c24243">add_select_option</a> (const <a class="el" href="structdpp_1_1select__option.html">select_option</a> &option)</td></tr>
<tr class="memdesc:ad39a99a7bb31f43bf3d2764aa3c24243"><td class="mdescLeft"> </td><td class="mdescRight">Add a select option. <a href="classdpp_1_1component.html#ad39a99a7bb31f43bf3d2764aa3c24243">More...</a><br /></td></tr>
<tr class="separator:ad39a99a7bb31f43bf3d2764aa3c24243"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3707437be16cc7dfd5edcf321f8e842d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1component.html">component</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a3707437be16cc7dfd5edcf321f8e842d">add_component</a> (const <a class="el" href="classdpp_1_1component.html">component</a> &c)</td></tr>
<tr class="memdesc:a3707437be16cc7dfd5edcf321f8e842d"><td class="mdescLeft"> </td><td class="mdescRight">Add a sub-component, only valid for action rows. Adding subcomponents to a component will automatically set this component's type to <a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7afd32ce8be4a99a9d84fb4815370a0bf8" title="Action row, a container for other components.">dpp::cot_action_row</a>. <a href="classdpp_1_1component.html#a3707437be16cc7dfd5edcf321f8e842d">More...</a><br /></td></tr>
<tr class="separator:a3707437be16cc7dfd5edcf321f8e842d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9ebca146649e8cff20a1b6e2479300c5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1component.html">component</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a9ebca146649e8cff20a1b6e2479300c5">add_default_value</a> (const <a class="el" href="classdpp_1_1snowflake.html">snowflake</a> id, const <a class="el" href="namespacedpp.html#a33007c1e6a21d250b7682025ebce9cdd">component_default_value_type</a> <a class="el" href="classdpp_1_1component.html#afdb70ec9968493ed54bab29135f8b8c6">type</a>)</td></tr>
<tr class="memdesc:a9ebca146649e8cff20a1b6e2479300c5"><td class="mdescLeft"> </td><td class="mdescRight">Add a default value. <a href="classdpp_1_1component.html#a9ebca146649e8cff20a1b6e2479300c5">More...</a><br /></td></tr>
<tr class="separator:a9ebca146649e8cff20a1b6e2479300c5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3693df30fb82d64bfabc4b86c28c8fce"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1component.html">component</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a3693df30fb82d64bfabc4b86c28c8fce">set_emoji</a> (std::string_view name, <a class="el" href="classdpp_1_1snowflake.html">dpp::snowflake</a> id=0, bool animated=false)</td></tr>
<tr class="memdesc:a3693df30fb82d64bfabc4b86c28c8fce"><td class="mdescLeft"> </td><td class="mdescRight">Set the emoji of the current sub-component. <a href="classdpp_1_1component.html#a3693df30fb82d64bfabc4b86c28c8fce">More...</a><br /></td></tr>
<tr class="separator:a3693df30fb82d64bfabc4b86c28c8fce"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a96011fc1c0d56e194f83c79d40c439c6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1component.html">component</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="structdpp_1_1json__interface.html#a96011fc1c0d56e194f83c79d40c439c6">fill_from_json</a> (nlohmann::json *j)</td></tr>
<tr class="memdesc:a96011fc1c0d56e194f83c79d40c439c6"><td class="mdescLeft"> </td><td class="mdescRight">Convert object from nlohmann::json. <a href="structdpp_1_1json__interface.html#a96011fc1c0d56e194f83c79d40c439c6">More...</a><br /></td></tr>
<tr class="separator:a96011fc1c0d56e194f83c79d40c439c6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae169e4231b77955fc1b43a3b7be9770c"><td class="memItemLeft" align="right" valign="top">auto </td><td class="memItemRight" valign="bottom"><a class="el" href="structdpp_1_1json__interface.html#ae169e4231b77955fc1b43a3b7be9770c">to_json</a> (bool with_id=false) const</td></tr>
<tr class="memdesc:ae169e4231b77955fc1b43a3b7be9770c"><td class="mdescLeft"> </td><td class="mdescRight">Convert object to nlohmann::json. <a href="structdpp_1_1json__interface.html#ae169e4231b77955fc1b43a3b7be9770c">More...</a><br /></td></tr>
<tr class="separator:ae169e4231b77955fc1b43a3b7be9770c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad615544432a8a6da87f3bd70d6f6b92c"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="structdpp_1_1json__interface.html#ad615544432a8a6da87f3bd70d6f6b92c">build_json</a> (bool with_id=false) const</td></tr>
<tr class="memdesc:ad615544432a8a6da87f3bd70d6f6b92c"><td class="mdescLeft"> </td><td class="mdescRight">Convert object to json string. <a href="structdpp_1_1json__interface.html#ad615544432a8a6da87f3bd70d6f6b92c">More...</a><br /></td></tr>
<tr class="separator:ad615544432a8a6da87f3bd70d6f6b92c"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:afdb70ec9968493ed54bab29135f8b8c6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7">component_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#afdb70ec9968493ed54bab29135f8b8c6">type</a></td></tr>
<tr class="memdesc:afdb70ec9968493ed54bab29135f8b8c6"><td class="mdescLeft"> </td><td class="mdescRight">Component type, either a button or action row. <a href="classdpp_1_1component.html#afdb70ec9968493ed54bab29135f8b8c6">More...</a><br /></td></tr>
<tr class="separator:afdb70ec9968493ed54bab29135f8b8c6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a51efd287b483b485f7019fb8263465ed"><td class="memItemLeft" align="right" valign="top">std::vector< <a class="el" href="classdpp_1_1component.html">component</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a51efd287b483b485f7019fb8263465ed">components</a></td></tr>
<tr class="memdesc:a51efd287b483b485f7019fb8263465ed"><td class="mdescLeft"> </td><td class="mdescRight">Sub components, buttons on an action row. <a href="classdpp_1_1component.html#a51efd287b483b485f7019fb8263465ed">More...</a><br /></td></tr>
<tr class="separator:a51efd287b483b485f7019fb8263465ed"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a177a7e35e4b310e2028464787396b1b4"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a177a7e35e4b310e2028464787396b1b4">label</a></td></tr>
<tr class="memdesc:a177a7e35e4b310e2028464787396b1b4"><td class="mdescLeft"> </td><td class="mdescRight">Component label (for buttons, text inputs). Maximum of 80 characters. <a href="classdpp_1_1component.html#a177a7e35e4b310e2028464787396b1b4">More...</a><br /></td></tr>
<tr class="separator:a177a7e35e4b310e2028464787396b1b4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a114f858c5c2bcdc1067cb26a14e578af"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacedpp.html#ad1aac955c38caa8b8581de35d6c432d5">component_style</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a114f858c5c2bcdc1067cb26a14e578af">style</a></td></tr>
<tr class="memdesc:a114f858c5c2bcdc1067cb26a14e578af"><td class="mdescLeft"> </td><td class="mdescRight">Component style (for buttons). <a href="classdpp_1_1component.html#a114f858c5c2bcdc1067cb26a14e578af">More...</a><br /></td></tr>
<tr class="separator:a114f858c5c2bcdc1067cb26a14e578af"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a69a2c73574bfb36961fee1df8f6ff771"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacedpp.html#a284d405e6b10bc80ec459ff2505edbb3">text_style_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a69a2c73574bfb36961fee1df8f6ff771">text_style</a></td></tr>
<tr class="memdesc:a69a2c73574bfb36961fee1df8f6ff771"><td class="mdescLeft"> </td><td class="mdescRight">Text style (for text inputs). <a href="classdpp_1_1component.html#a69a2c73574bfb36961fee1df8f6ff771">More...</a><br /></td></tr>
<tr class="separator:a69a2c73574bfb36961fee1df8f6ff771"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9d5ae2ba0812d8c8e7345b3271d75e71"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a9d5ae2ba0812d8c8e7345b3271d75e71">custom_id</a></td></tr>
<tr class="memdesc:a9d5ae2ba0812d8c8e7345b3271d75e71"><td class="mdescLeft"> </td><td class="mdescRight">Component id (for buttons, menus, text inputs). Maximum of 100 characters. <a href="classdpp_1_1component.html#a9d5ae2ba0812d8c8e7345b3271d75e71">More...</a><br /></td></tr>
<tr class="separator:a9d5ae2ba0812d8c8e7345b3271d75e71"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a79ad72fb0e31440e8f644e79a5870573"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a79ad72fb0e31440e8f644e79a5870573">url</a></td></tr>
<tr class="memdesc:a79ad72fb0e31440e8f644e79a5870573"><td class="mdescLeft"> </td><td class="mdescRight">URL for link types (<a class="el" href="namespacedpp.html#ad1aac955c38caa8b8581de35d6c432d5a96d13813649e792fc6d88d29b70202d6" title="An external hyperlink to a website, requires url to be set.">dpp::cos_link</a>). Maximum of 512 characters. <a href="classdpp_1_1component.html#a79ad72fb0e31440e8f644e79a5870573">More...</a><br /></td></tr>
<tr class="separator:a79ad72fb0e31440e8f644e79a5870573"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abb844cd70be8763ce5570b1e9de40f9b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1snowflake.html">dpp::snowflake</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#abb844cd70be8763ce5570b1e9de40f9b">sku_id</a></td></tr>
<tr class="memdesc:abb844cd70be8763ce5570b1e9de40f9b"><td class="mdescLeft"> </td><td class="mdescRight">The SKU ID for premium upsell buttons. <a href="classdpp_1_1component.html#abb844cd70be8763ce5570b1e9de40f9b">More...</a><br /></td></tr>
<tr class="separator:abb844cd70be8763ce5570b1e9de40f9b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4fe9d95b2fd61a38269c3368db4c17ce"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a4fe9d95b2fd61a38269c3368db4c17ce">placeholder</a></td></tr>
<tr class="memdesc:a4fe9d95b2fd61a38269c3368db4c17ce"><td class="mdescLeft"> </td><td class="mdescRight">Placeholder text for select menus and text inputs (max 150 characters) <a href="classdpp_1_1component.html#a4fe9d95b2fd61a38269c3368db4c17ce">More...</a><br /></td></tr>
<tr class="separator:a4fe9d95b2fd61a38269c3368db4c17ce"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2278f6585edfa07f2b7711aaf31cf5a3"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a2278f6585edfa07f2b7711aaf31cf5a3">min_values</a></td></tr>
<tr class="memdesc:a2278f6585edfa07f2b7711aaf31cf5a3"><td class="mdescLeft"> </td><td class="mdescRight">Minimum number of items that must be chosen for a select menu (0-25). <a href="classdpp_1_1component.html#a2278f6585edfa07f2b7711aaf31cf5a3">More...</a><br /></td></tr>
<tr class="separator:a2278f6585edfa07f2b7711aaf31cf5a3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a35895913793b44ca33d039e4042afc25"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a35895913793b44ca33d039e4042afc25">max_values</a></td></tr>
<tr class="memdesc:a35895913793b44ca33d039e4042afc25"><td class="mdescLeft"> </td><td class="mdescRight">Maximum number of items that can be chosen for a select menu (0-25). <a href="classdpp_1_1component.html#a35895913793b44ca33d039e4042afc25">More...</a><br /></td></tr>
<tr class="separator:a35895913793b44ca33d039e4042afc25"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a35e8a8aabfd66a0f23ece038591e4747"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a35e8a8aabfd66a0f23ece038591e4747">min_length</a></td></tr>
<tr class="memdesc:a35e8a8aabfd66a0f23ece038591e4747"><td class="mdescLeft"> </td><td class="mdescRight">Minimum length for text input (0-4000) <a href="classdpp_1_1component.html#a35e8a8aabfd66a0f23ece038591e4747">More...</a><br /></td></tr>
<tr class="separator:a35e8a8aabfd66a0f23ece038591e4747"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa0a71bbf2f4cac7d87a53ad1ec89da37"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#aa0a71bbf2f4cac7d87a53ad1ec89da37">max_length</a></td></tr>
<tr class="memdesc:aa0a71bbf2f4cac7d87a53ad1ec89da37"><td class="mdescLeft"> </td><td class="mdescRight">Maximum length for text input (1-4000) <a href="classdpp_1_1component.html#aa0a71bbf2f4cac7d87a53ad1ec89da37">More...</a><br /></td></tr>
<tr class="separator:aa0a71bbf2f4cac7d87a53ad1ec89da37"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad4f47e82e57e28a1aac48027e43b2fd9"><td class="memItemLeft" align="right" valign="top">std::vector< <a class="el" href="structdpp_1_1select__option.html">select_option</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#ad4f47e82e57e28a1aac48027e43b2fd9">options</a></td></tr>
<tr class="memdesc:ad4f47e82e57e28a1aac48027e43b2fd9"><td class="mdescLeft"> </td><td class="mdescRight">Select options for select menus. <a href="classdpp_1_1component.html#ad4f47e82e57e28a1aac48027e43b2fd9">More...</a><br /></td></tr>
<tr class="separator:ad4f47e82e57e28a1aac48027e43b2fd9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8acea6badb01425ea51dc50f0c8ab87c"><td class="memItemLeft" align="right" valign="top">std::vector< uint8_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a8acea6badb01425ea51dc50f0c8ab87c">channel_types</a></td></tr>
<tr class="memdesc:a8acea6badb01425ea51dc50f0c8ab87c"><td class="mdescLeft"> </td><td class="mdescRight">List of channel types (<a class="el" href="namespacedpp.html#a732e832861149a278f27ea7840b8e4ca" title="Flag integers as received from and sent to discord.">dpp::channel_type</a>) to include in the channel select component (<a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7a67cb03df6c78061abb9605e50353da0e" title="Select menu for channels.">dpp::cot_channel_selectmenu</a>) <a href="classdpp_1_1component.html#a8acea6badb01425ea51dc50f0c8ab87c">More...</a><br /></td></tr>
<tr class="separator:a8acea6badb01425ea51dc50f0c8ab87c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acdecdf829c343e1b3aa826e50b3019e3"><td class="memItemLeft" align="right" valign="top">std::vector< <a class="el" href="structdpp_1_1component__default__value.html">component_default_value</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#acdecdf829c343e1b3aa826e50b3019e3">default_values</a></td></tr>
<tr class="memdesc:acdecdf829c343e1b3aa826e50b3019e3"><td class="mdescLeft"> </td><td class="mdescRight">List of default values for auto-populated select menu components. <a href="classdpp_1_1component.html#acdecdf829c343e1b3aa826e50b3019e3">More...</a><br /></td></tr>
<tr class="separator:acdecdf829c343e1b3aa826e50b3019e3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad364b789494d7888666173079bdb48ad"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#ad364b789494d7888666173079bdb48ad">disabled</a></td></tr>
<tr class="memdesc:ad364b789494d7888666173079bdb48ad"><td class="mdescLeft"> </td><td class="mdescRight">Disabled flag (for buttons) <a href="classdpp_1_1component.html#ad364b789494d7888666173079bdb48ad">More...</a><br /></td></tr>
<tr class="separator:ad364b789494d7888666173079bdb48ad"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6a6312c0c598466aa87541745d2f7bff"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a6a6312c0c598466aa87541745d2f7bff">required</a></td></tr>
<tr class="memdesc:a6a6312c0c598466aa87541745d2f7bff"><td class="mdescLeft"> </td><td class="mdescRight">Whether the text input is required to be filled. <a href="classdpp_1_1component.html#a6a6312c0c598466aa87541745d2f7bff">More...</a><br /></td></tr>
<tr class="separator:a6a6312c0c598466aa87541745d2f7bff"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aea6ebd38924644607081d88d0a32213c"><td class="memItemLeft" align="right" valign="top">std::variant< std::monostate, std::string, int64_t, double > </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#aea6ebd38924644607081d88d0a32213c">value</a></td></tr>
<tr class="memdesc:aea6ebd38924644607081d88d0a32213c"><td class="mdescLeft"> </td><td class="mdescRight">Value of the modal. Filled or valid when populated from an on_form_submit event, or from the set_value function. <a href="classdpp_1_1component.html#aea6ebd38924644607081d88d0a32213c">More...</a><br /></td></tr>
<tr class="separator:aea6ebd38924644607081d88d0a32213c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab6c5409437d791bbf7524ff1f10fe20f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structdpp_1_1partial__emoji.html">partial_emoji</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#ab6c5409437d791bbf7524ff1f10fe20f">emoji</a></td></tr>
<tr class="memdesc:ab6c5409437d791bbf7524ff1f10fe20f"><td class="mdescLeft"> </td><td class="mdescRight">The emoji for this component. <a href="classdpp_1_1component.html#ab6c5409437d791bbf7524ff1f10fe20f">More...</a><br /></td></tr>
<tr class="separator:ab6c5409437d791bbf7524ff1f10fe20f"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-methods" name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:acb23c977bd82051cd5fdc982a69070e4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1component.html">component</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#acb23c977bd82051cd5fdc982a69070e4">fill_from_json_impl</a> (nlohmann::json *j)</td></tr>
<tr class="separator:acb23c977bd82051cd5fdc982a69070e4"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="friends" name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a7abe6ae6d10439784fabce0dc24f785a"><td class="memItemLeft" align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1component.html#a7abe6ae6d10439784fabce0dc24f785a">json_interface< component ></a></td></tr>
<tr class="separator:a7abe6ae6d10439784fabce0dc24f785a"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Represents the component object. A component is a clickable button or drop down list within a discord message, where the buttons emit on_button_click events when the user interacts with them. </p>
<p >You should generally define one component object and then insert one or more additional components into it using <a class="el" href="classdpp_1_1component.html#a3707437be16cc7dfd5edcf321f8e842d" title="Add a sub-component, only valid for action rows. Adding subcomponents to a component will automatical...">component::add_component()</a>, so that the parent object is an action row and the child objects are buttons. </p>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a id="a69b9e60742f6a1f1622b264cd7712660" name="a69b9e60742f6a1f1622b264cd7712660"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69b9e60742f6a1f1622b264cd7712660">◆ </a></span>component()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">dpp::component::component </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructor. </p>
</div>
</div>
<a id="a790334ad68b127e95923c5f6cdb727a7" name="a790334ad68b127e95923c5f6cdb727a7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a790334ad68b127e95923c5f6cdb727a7">◆ </a></span>~component()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual dpp::component::~component </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span><span class="mlabel">default</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Destructor. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="af83f1098e87ce1dd11e475dfd4740b16" name="af83f1098e87ce1dd11e475dfd4740b16"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af83f1098e87ce1dd11e475dfd4740b16">◆ </a></span>add_channel_type()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1component.html">component</a> & dpp::component::add_channel_type </td>
<td>(</td>
<td class="paramtype">uint8_t </td>
<td class="paramname"><em>ct</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add a channel type to include in the channel select component (<a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7a67cb03df6c78061abb9605e50353da0e" title="Select menu for channels.">dpp::cot_channel_selectmenu</a>) </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ct</td><td>The <a class="el" href="namespacedpp.html#a732e832861149a278f27ea7840b8e4ca" title="Flag integers as received from and sent to discord.">dpp::channel_type</a> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>component& reference to self </dd></dl>
</div>
</div>
<a id="a3707437be16cc7dfd5edcf321f8e842d" name="a3707437be16cc7dfd5edcf321f8e842d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3707437be16cc7dfd5edcf321f8e842d">◆ </a></span>add_component()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1component.html">component</a> & dpp::component::add_component </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classdpp_1_1component.html">component</a> & </td>
<td class="paramname"><em>c</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add a sub-component, only valid for action rows. Adding subcomponents to a component will automatically set this component's type to <a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7afd32ce8be4a99a9d84fb4815370a0bf8" title="Action row, a container for other components.">dpp::cot_action_row</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">c</td><td>The sub-component to add </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>component& reference to self </dd></dl>
</div>
</div>
<a id="a9ebca146649e8cff20a1b6e2479300c5" name="a9ebca146649e8cff20a1b6e2479300c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9ebca146649e8cff20a1b6e2479300c5">◆ </a></span>add_default_value()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1component.html">component</a> & dpp::component::add_default_value </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classdpp_1_1snowflake.html">snowflake</a> </td>
<td class="paramname"><em>id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacedpp.html#a33007c1e6a21d250b7682025ebce9cdd">component_default_value_type</a> </td>
<td class="paramname"><em>type</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add a default value. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">id</td><td>Default value. ID of a user, role, or channel </td></tr>
<tr><td class="paramname">type</td><td>The type this default value represents </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ad39a99a7bb31f43bf3d2764aa3c24243" name="ad39a99a7bb31f43bf3d2764aa3c24243"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad39a99a7bb31f43bf3d2764aa3c24243">◆ </a></span>add_select_option()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1component.html">component</a> & dpp::component::add_select_option </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structdpp_1_1select__option.html">select_option</a> & </td>
<td class="paramname"><em>option</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add a select option. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">option</td><td>option to add </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>component& Reference to self </dd></dl>
</div>
</div>
<a id="ad615544432a8a6da87f3bd70d6f6b92c" name="ad615544432a8a6da87f3bd70d6f6b92c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad615544432a8a6da87f3bd70d6f6b92c">◆ </a></span>build_json()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::string <a class="el" href="structdpp_1_1json__interface.html">dpp::json_interface</a>< <a class="el" href="classdpp_1_1component.html">component</a> >::build_json </td>
<td>(</td>
<td class="paramtype">bool </td>
<td class="paramname"><em>with_id</em> = <code>false</code></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Convert object to json string. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">with_id</td><td>Whether to include the ID or not </td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Some fields are conditionally filled, do not rely on all fields being present </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>std::string Json built from the structure </dd></dl>
</div>
</div>
<a id="a96011fc1c0d56e194f83c79d40c439c6" name="a96011fc1c0d56e194f83c79d40c439c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a96011fc1c0d56e194f83c79d40c439c6">◆ </a></span>fill_from_json()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1component.html">component</a> & <a class="el" href="structdpp_1_1json__interface.html">dpp::json_interface</a>< <a class="el" href="classdpp_1_1component.html">component</a> >::fill_from_json </td>
<td>(</td>
<td class="paramtype">nlohmann::json * </td>
<td class="paramname"><em>j</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Convert object from nlohmann::json. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">j</td><td>nlohmann::json object </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>T& Reference to self for fluent calling </dd></dl>
</div>
</div>
<a id="acb23c977bd82051cd5fdc982a69070e4" name="acb23c977bd82051cd5fdc982a69070e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb23c977bd82051cd5fdc982a69070e4">◆ </a></span>fill_from_json_impl()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1component.html">component</a> & dpp::component::fill_from_json_impl </td>
<td>(</td>
<td class="paramtype">nlohmann::json * </td>
<td class="paramname"><em>j</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p >Read class values from json object </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">j</td><td>A json object to read from </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A reference to self </dd></dl>
</div>
</div>
<a id="af68cc0f09b37f0cbd4a29b083c701904" name="af68cc0f09b37f0cbd4a29b083c701904"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af68cc0f09b37f0cbd4a29b083c701904">◆ </a></span>set_default_value()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1component.html">component</a> & dpp::component::set_default_value </td>
<td>(</td>
<td class="paramtype">std::string_view </td>
<td class="paramname"><em>val</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the default value of the text input component. For action rows, this field is ignored. Setting the value will auto-set the type to <a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7a8fdd4137c3888268fad7cab29c7b765b" title="Text input.">dpp::cot_text</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">val</td><td>Value text to set. It will be truncated to the maximum length of 4000 UTF-8 characters. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>component& Reference to self </dd></dl>
</div>
</div>
<a id="a48a2ab72eaf6e58073a1f5dc936877a3" name="a48a2ab72eaf6e58073a1f5dc936877a3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a48a2ab72eaf6e58073a1f5dc936877a3">◆ </a></span>set_disabled()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1component.html">component</a> & dpp::component::set_disabled </td>
<td>(</td>
<td class="paramtype">bool </td>
<td class="paramname"><em>disable</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the component to disabled. Defaults to false on all created components. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">disable</td><td>True to disable the component, False to enable the component. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>component& Reference to self </dd></dl>
</div>
</div>
<a id="a3693df30fb82d64bfabc4b86c28c8fce" name="a3693df30fb82d64bfabc4b86c28c8fce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3693df30fb82d64bfabc4b86c28c8fce">◆ </a></span>set_emoji()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1component.html">component</a> & dpp::component::set_emoji </td>
<td>(</td>
<td class="paramtype">std::string_view </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classdpp_1_1snowflake.html">dpp::snowflake</a> </td>
<td class="paramname"><em>id</em> = <code>0</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>animated</em> = <code>false</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the emoji of the current sub-component. </p>
<dl class="section warning"><dt>Warning</dt><dd>Only valid for buttons.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Adding an emoji to a component will automatically set this components type to <a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7a98228836af5d0c180cfc05eb1f0bfde9" title="Clickable button.">dpp::cot_button</a>. <b>One or both of name and id must be set</b>. For a built in unicode emoji, you only need set name, and should set it to a unicode character e.g. "😄". For custom emojis, set the name to the name of the emoji on the guild, and the id to the emoji's ID. Setting the animated boolean is only valid for custom emojis.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Emoji name, or unicode character to use </td></tr>
<tr><td class="paramname">id</td><td>Emoji id, for custom emojis only. </td></tr>
<tr><td class="paramname">animated</td><td>True if the custom emoji is animated. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>component& Reference to self </dd></dl>
</div>
</div>
<a id="a5b5e20746e11d017569ccc46efd56688" name="a5b5e20746e11d017569ccc46efd56688"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5b5e20746e11d017569ccc46efd56688">◆ </a></span>set_id()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1component.html">component</a> & dpp::component::set_id </td>
<td>(</td>
<td class="paramtype">std::string_view </td>
<td class="paramname"><em>id</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the id of the component. For action rows, this field is ignored. Setting the id will auto-set the type to <a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7a98228836af5d0c180cfc05eb1f0bfde9" title="Clickable button.">dpp::cot_button</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">id</td><td>Custom ID string to set. This ID will be sent for any on_button_click events related to the button. </td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The maximum length of the Custom ID is 100 UTF-8 codepoints. If your Custom ID is longer than this, it will be truncated. </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>component& Reference to self </dd></dl>
</div>
</div>
<a id="a33f254b5ac5a043870cb30efc99fb580" name="a33f254b5ac5a043870cb30efc99fb580"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a33f254b5ac5a043870cb30efc99fb580">◆ </a></span>set_label()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1component.html">component</a> & dpp::component::set_label </td>
<td>(</td>
<td class="paramtype">std::string_view </td>
<td class="paramname"><em>label</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the label of the component, e.g. button text. For action rows, this field is ignored. Setting the label will auto-set the type to <a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7a98228836af5d0c180cfc05eb1f0bfde9" title="Clickable button.">dpp::cot_button</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">label</td><td>Label text to set. It will be truncated to the maximum length of 80 UTF-8 characters. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>component& Reference to self </dd></dl>
</div>
</div>
<a id="a3778e0e45c429697f799ca431bb383ad" name="a3778e0e45c429697f799ca431bb383ad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3778e0e45c429697f799ca431bb383ad">◆ </a></span>set_max_length()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1component.html">component</a> & dpp::component::set_max_length </td>
<td>(</td>
<td class="paramtype">uint32_t </td>
<td class="paramname"><em>max_l</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the maximum input length for a text input. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">max_l</td><td>max length to set (1-4000) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>component& Reference to self </dd></dl>
</div>
</div>
<a id="a94aa64e7a19c975953ab40c2b7f34573" name="a94aa64e7a19c975953ab40c2b7f34573"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a94aa64e7a19c975953ab40c2b7f34573">◆ </a></span>set_max_values()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1component.html">component</a> & dpp::component::set_max_values </td>
<td>(</td>
<td class="paramtype">uint32_t </td>
<td class="paramname"><em>max_values</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the maximum number of items that can be chosen for a select menu. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">max_values</td><td>max value to set (0-25) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>component& Reference to self </dd></dl>
</div>
</div>
<a id="aa23287b8b438eb808b2106c50421235b" name="aa23287b8b438eb808b2106c50421235b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa23287b8b438eb808b2106c50421235b">◆ </a></span>set_min_length()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1component.html">component</a> & dpp::component::set_min_length </td>
<td>(</td>
<td class="paramtype">uint32_t </td>
<td class="paramname"><em>min_l</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the minimum input length for a text input. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">min_l</td><td>min length to set (0-4000) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>component& Reference to self </dd></dl>
</div>
</div>
<a id="a39de811904ed62eb0fa2d37be2918503" name="a39de811904ed62eb0fa2d37be2918503"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a39de811904ed62eb0fa2d37be2918503">◆ </a></span>set_min_values()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1component.html">component</a> & dpp::component::set_min_values </td>
<td>(</td>
<td class="paramtype">uint32_t </td>
<td class="paramname"><em>min_values</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the minimum number of items that must be chosen for a select menu. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">min_values</td><td>min value to set (0-25) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>component& Reference to self </dd></dl>
</div>
</div>
<a id="a520c883895cf9ea91c9ce17f7b11ff52" name="a520c883895cf9ea91c9ce17f7b11ff52"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a520c883895cf9ea91c9ce17f7b11ff52">◆ </a></span>set_placeholder()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1component.html">component</a> & dpp::component::set_placeholder </td>
<td>(</td>
<td class="paramtype">std::string_view </td>
<td class="paramname"><em>placeholder</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the placeholder. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">placeholder</td><td>placeholder string. It will be truncated to the maximum length of 150 UTF-8 characters for select menus, and 100 UTF-8 characters for modals. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>component& Reference to self </dd></dl>
</div>
</div>
<a id="ad75a96f7fb63cc2721a605e7d61cc477" name="ad75a96f7fb63cc2721a605e7d61cc477"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad75a96f7fb63cc2721a605e7d61cc477">◆ </a></span>set_required()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1component.html">component</a> & dpp::component::set_required </td>
<td>(</td>
<td class="paramtype">bool </td>
<td class="paramname"><em>require</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set if this component is required. Defaults to false on all created components. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">require</td><td>True to require this, false to make it optional. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>component& Reference to self </dd></dl>
</div>
</div>
<a id="ac4c9bd7a5216e4f6e8ac87ea34cf6193" name="ac4c9bd7a5216e4f6e8ac87ea34cf6193"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac4c9bd7a5216e4f6e8ac87ea34cf6193">◆ </a></span>set_sku_id()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1component.html">component</a> & dpp::component::set_sku_id </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classdpp_1_1snowflake.html">dpp::snowflake</a> </td>
<td class="paramname"><em>sku</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the SKU ID for a premium upsell button This is only valid for premium upsell buttons of type cos_premium. It indicates which premium package to link to when the button is clicked. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sku</td><td>The SKU ID </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>component& reference to self </dd></dl>
</div>
</div>
<a id="a19213be82f2cd18748f669e53e1348a8" name="a19213be82f2cd18748f669e53e1348a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a19213be82f2cd18748f669e53e1348a8">◆ </a></span>set_style()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1component.html">component</a> & dpp::component::set_style </td>
<td>(</td>
<td class="paramtype"><a class="el" href="namespacedpp.html#ad1aac955c38caa8b8581de35d6c432d5">component_style</a> </td>
<td class="paramname"><em>cs</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the style of the component, e.g. button colour. For action rows, this field is ignored. Setting the style will auto-set the type to <a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7a98228836af5d0c180cfc05eb1f0bfde9" title="Clickable button.">dpp::cot_button</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">cs</td><td>Component style to set </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>component& reference to self </dd></dl>
</div>
</div>
<a id="a4d2cd2b2c6169c31b4b3e41ce8698afe" name="a4d2cd2b2c6169c31b4b3e41ce8698afe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d2cd2b2c6169c31b4b3e41ce8698afe">◆ </a></span>set_text_style()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1component.html">component</a> & dpp::component::set_text_style </td>
<td>(</td>
<td class="paramtype"><a class="el" href="namespacedpp.html#a284d405e6b10bc80ec459ff2505edbb3">text_style_type</a> </td>
<td class="paramname"><em>ts</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the text style of a text component. </p>
<dl class="section note"><dt>Note</dt><dd>Sets type to <code>cot_text</code></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ts</td><td>Text style type to set </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>component& reference to self </dd></dl>
</div>
</div>
<a id="a281e39d6b8c65b1fd301d195a835e703" name="a281e39d6b8c65b1fd301d195a835e703"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a281e39d6b8c65b1fd301d195a835e703">◆ </a></span>set_type()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1component.html">component</a> & dpp::component::set_type </td>
<td>(</td>
<td class="paramtype"><a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7">component_type</a> </td>
<td class="paramname"><em>ct</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the type of the component. Button components (type <a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7a98228836af5d0c180cfc05eb1f0bfde9" title="Clickable button.">dpp::cot_button</a>) should always be contained within an action row (type <a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7afd32ce8be4a99a9d84fb4815370a0bf8" title="Action row, a container for other components.">dpp::cot_action_row</a>). As described below, many of the other methods automatically set this to the correct type so usually you should not need to manually call <a class="el" href="classdpp_1_1component.html#a281e39d6b8c65b1fd301d195a835e703" title="Set the type of the component. Button components (type dpp::cot_button) should always be contained wi...">component::set_type()</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">ct</td><td>The component type </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>component& reference to self </dd></dl>
</div>
</div>
<a id="a11d0409aab14e5a4fa19612785d83f2b" name="a11d0409aab14e5a4fa19612785d83f2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a11d0409aab14e5a4fa19612785d83f2b">◆ </a></span>set_url()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1component.html">component</a> & dpp::component::set_url </td>
<td>(</td>
<td class="paramtype">std::string_view </td>
<td class="paramname"><em>url</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the url for <a class="el" href="namespacedpp.html#ad1aac955c38caa8b8581de35d6c432d5a96d13813649e792fc6d88d29b70202d6" title="An external hyperlink to a website, requires url to be set.">dpp::cos_link</a> types. Calling this function sets the style to <a class="el" href="namespacedpp.html#ad1aac955c38caa8b8581de35d6c432d5a96d13813649e792fc6d88d29b70202d6" title="An external hyperlink to a website, requires url to be set.">dpp::cos_link</a> and the type to <a class="el" href="namespacedpp.html#afce43206033521b990e3a72bb87481b7a98228836af5d0c180cfc05eb1f0bfde9" title="Clickable button.">dpp::cot_button</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>