-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclassdpp_1_1commandhandler.html
725 lines (667 loc) · 49.4 KB
/
classdpp_1_1commandhandler.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
<!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::commandhandler 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::commandhandler 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::commandhandler Class Reference - D++ - The lightweight C++ Discord API Library">
<title>dpp::commandhandler 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.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_1commandhandler.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="classdpp_1_1commandhandler-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">dpp::commandhandler Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>The commandhandler class represents a group of commands, prefixed or slash commands with handling functions.
<a href="classdpp_1_1commandhandler.html#details">More...</a></p>
<p><code>#include <commandhandler.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="+"/> Collaboration diagram for dpp::commandhandler:</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"><div class="zoom"><iframe scrolling="no" frameborder="0" src="classdpp_1_1commandhandler__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:a064419ada0fd30cee04faec9f75ba04d"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1commandhandler.html#a064419ada0fd30cee04faec9f75ba04d">string_has_prefix</a> (std::string &str)</td></tr>
<tr class="memdesc:a064419ada0fd30cee04faec9f75ba04d"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the string has a known prefix on the start. Modifies string to remove prefix if it returns true. <a href="classdpp_1_1commandhandler.html#a064419ada0fd30cee04faec9f75ba04d">More...</a><br /></td></tr>
<tr class="separator:a064419ada0fd30cee04faec9f75ba04d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7300779eb1aaf04041e48c756abafafb"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1commandhandler.html#a7300779eb1aaf04041e48c756abafafb">commandhandler</a> (class <a class="el" href="classdpp_1_1cluster.html">cluster</a> *o, bool auto_hook_events=true, <a class="el" href="classdpp_1_1snowflake.html">snowflake</a> application_id=0)</td></tr>
<tr class="memdesc:a7300779eb1aaf04041e48c756abafafb"><td class="mdescLeft"> </td><td class="mdescRight">Construct a new commandhandler object. <a href="classdpp_1_1commandhandler.html#a7300779eb1aaf04041e48c756abafafb">More...</a><br /></td></tr>
<tr class="separator:a7300779eb1aaf04041e48c756abafafb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a62373f8cdd5b887eb78eb4f4cb265baf"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1commandhandler.html#a62373f8cdd5b887eb78eb4f4cb265baf">~commandhandler</a> ()</td></tr>
<tr class="memdesc:a62373f8cdd5b887eb78eb4f4cb265baf"><td class="mdescLeft"> </td><td class="mdescRight">Destroy the commandhandler object. <a href="classdpp_1_1commandhandler.html#a62373f8cdd5b887eb78eb4f4cb265baf">More...</a><br /></td></tr>
<tr class="separator:a62373f8cdd5b887eb78eb4f4cb265baf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8640d327288a6dd1c5fdbde85726e7de"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1commandhandler.html">commandhandler</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1commandhandler.html#a8640d327288a6dd1c5fdbde85726e7de">set_owner</a> (class <a class="el" href="classdpp_1_1cluster.html">cluster</a> *o)</td></tr>
<tr class="memdesc:a8640d327288a6dd1c5fdbde85726e7de"><td class="mdescLeft"> </td><td class="mdescRight">Set the application id after construction. <a href="classdpp_1_1commandhandler.html#a8640d327288a6dd1c5fdbde85726e7de">More...</a><br /></td></tr>
<tr class="separator:a8640d327288a6dd1c5fdbde85726e7de"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a69ce2bb96adb1a658b3a29c37274f2bb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1commandhandler.html">commandhandler</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1commandhandler.html#a69ce2bb96adb1a658b3a29c37274f2bb">add_prefix</a> (const std::string &prefix)</td></tr>
<tr class="memdesc:a69ce2bb96adb1a658b3a29c37274f2bb"><td class="mdescLeft"> </td><td class="mdescRight">Add a prefix to the command handler. <a href="classdpp_1_1commandhandler.html#a69ce2bb96adb1a658b3a29c37274f2bb">More...</a><br /></td></tr>
<tr class="separator:a69ce2bb96adb1a658b3a29c37274f2bb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a791ed0c75ef77306af84be30ded619f8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1commandhandler.html">commandhandler</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1commandhandler.html#a791ed0c75ef77306af84be30ded619f8">add_command</a> (const std::string &command, const <a class="el" href="namespacedpp.html#a6daf230da747f01eeaa36fd3d5e51a65">parameter_registration_t</a> &parameters, <a class="el" href="namespacedpp.html#a72a8ab3231965d0e361f305a7fe431f3">command_handler</a> handler, const std::string &description="", <a class="el" href="classdpp_1_1snowflake.html">snowflake</a> guild_id=0)</td></tr>
<tr class="memdesc:a791ed0c75ef77306af84be30ded619f8"><td class="mdescLeft"> </td><td class="mdescRight">Add a command to the command handler. <a href="classdpp_1_1commandhandler.html#a791ed0c75ef77306af84be30ded619f8">More...</a><br /></td></tr>
<tr class="separator:a791ed0c75ef77306af84be30ded619f8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a208f3684f3987d87074824bd13699e42"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1commandhandler.html">commandhandler</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1commandhandler.html#a208f3684f3987d87074824bd13699e42">register_commands</a> ()</td></tr>
<tr class="memdesc:a208f3684f3987d87074824bd13699e42"><td class="mdescLeft"> </td><td class="mdescRight">Register all slash commands with Discord This method must be called at least once if you are using the "/" prefix to mark the end of commands being added to the handler. Note that this uses bulk registration and will replace any existing slash commands. <a href="classdpp_1_1commandhandler.html#a208f3684f3987d87074824bd13699e42">More...</a><br /></td></tr>
<tr class="separator:a208f3684f3987d87074824bd13699e42"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a957dfe206c80cd7176e7ab663e9a1bf2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1commandhandler.html#a957dfe206c80cd7176e7ab663e9a1bf2">route</a> (const struct <a class="el" href="structdpp_1_1message__create__t.html">dpp::message_create_t</a> &event)</td></tr>
<tr class="memdesc:a957dfe206c80cd7176e7ab663e9a1bf2"><td class="mdescLeft"> </td><td class="mdescRight">Route a command from the on_message_create function. Call this method from within your on_message_create with the received <a class="el" href="structdpp_1_1message.html" title="Represents messages sent and received on Discord.">dpp::message</a> object if you have disabled automatic registration of events. <a href="classdpp_1_1commandhandler.html#a957dfe206c80cd7176e7ab663e9a1bf2">More...</a><br /></td></tr>
<tr class="separator:a957dfe206c80cd7176e7ab663e9a1bf2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2a49a132a938c1952f77a31de8335cce"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1commandhandler.html#a2a49a132a938c1952f77a31de8335cce">route</a> (const struct <a class="el" href="structdpp_1_1slashcommand__t.html">slashcommand_t</a> &event)</td></tr>
<tr class="memdesc:a2a49a132a938c1952f77a31de8335cce"><td class="mdescLeft"> </td><td class="mdescRight">Route a command from the on_slashcommand function. Call this method from your on_slashcommand with the received <a class="el" href="structdpp_1_1interaction__create__t.html" title="Create interaction.">dpp::interaction_create_t</a> object if you have disabled automatic registration of events. <a href="classdpp_1_1commandhandler.html#a2a49a132a938c1952f77a31de8335cce">More...</a><br /></td></tr>
<tr class="separator:a2a49a132a938c1952f77a31de8335cce"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad8ddefafe9e85a86829775f385fe5f23"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1commandhandler.html#ad8ddefafe9e85a86829775f385fe5f23">reply</a> (const <a class="el" href="structdpp_1_1message.html">dpp::message</a> &m, <a class="el" href="structdpp_1_1command__source.html">command_source</a> source, <a class="el" href="namespacedpp.html#a022dce6b086ec4515384eaece59c84c3">command_completion_event_t</a> callback=<a class="el" href="namespacedpp_1_1utility.html#ab1b44934665a2561416383fb2229523e">utility::log_error</a>())</td></tr>
<tr class="memdesc:ad8ddefafe9e85a86829775f385fe5f23"><td class="mdescLeft"> </td><td class="mdescRight">Reply to a command. You should use this method rather than <a class="el" href="classdpp_1_1cluster.html#aa6ae3dc32ebc2dd14264962710d35af7" title="Send a message to a channel. The callback function is called when the message has been sent.">cluster::message_create</a> as the way you reply varies between slash commands and message commands. Note you should ALWAYS reply. Slash commands will emit an ugly error to the user if you do not emit some form of reply within 3 seconds. <a href="classdpp_1_1commandhandler.html#ad8ddefafe9e85a86829775f385fe5f23">More...</a><br /></td></tr>
<tr class="separator:ad8ddefafe9e85a86829775f385fe5f23"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af41ce62f462d7bb8ea2046a9c7311c4f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1commandhandler.html#af41ce62f462d7bb8ea2046a9c7311c4f">thinking</a> (<a class="el" href="structdpp_1_1command__source.html">command_source</a> source, <a class="el" href="namespacedpp.html#a022dce6b086ec4515384eaece59c84c3">command_completion_event_t</a> callback=<a class="el" href="namespacedpp_1_1utility.html#ab1b44934665a2561416383fb2229523e">utility::log_error</a>())</td></tr>
<tr class="memdesc:af41ce62f462d7bb8ea2046a9c7311c4f"><td class="mdescLeft"> </td><td class="mdescRight">Reply to a command without a message, causing the discord client to display "Bot name is thinking...". The "thinking" message will persist for a maximum of 15 minutes. This counts as a reply for a slash command. Slash commands will emit an ugly error to the user if you do not emit some form of reply within 3 seconds. <a href="classdpp_1_1commandhandler.html#af41ce62f462d7bb8ea2046a9c7311c4f">More...</a><br /></td></tr>
<tr class="separator:af41ce62f462d7bb8ea2046a9c7311c4f"><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:aaeb676a799cda302d4b08106f898a867"><td class="memItemLeft" align="right" valign="top">std::unordered_map< std::string, <a class="el" href="structdpp_1_1command__info__t.html">command_info_t</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1commandhandler.html#aaeb676a799cda302d4b08106f898a867">commands</a></td></tr>
<tr class="memdesc:aaeb676a799cda302d4b08106f898a867"><td class="mdescLeft"> </td><td class="mdescRight">Commands in the handler. <a href="classdpp_1_1commandhandler.html#aaeb676a799cda302d4b08106f898a867">More...</a><br /></td></tr>
<tr class="separator:aaeb676a799cda302d4b08106f898a867"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acbbac80b9d8fd5b3f82fd5bfc919f9bc"><td class="memItemLeft" align="right" valign="top">std::vector< std::string > </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1commandhandler.html#acbbac80b9d8fd5b3f82fd5bfc919f9bc">prefixes</a></td></tr>
<tr class="memdesc:acbbac80b9d8fd5b3f82fd5bfc919f9bc"><td class="mdescLeft"> </td><td class="mdescRight">Valid prefixes. <a href="classdpp_1_1commandhandler.html#acbbac80b9d8fd5b3f82fd5bfc919f9bc">More...</a><br /></td></tr>
<tr class="separator:acbbac80b9d8fd5b3f82fd5bfc919f9bc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a29e869380af75e438094960b2e66a898"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1commandhandler.html#a29e869380af75e438094960b2e66a898">slash_commands_enabled</a></td></tr>
<tr class="memdesc:a29e869380af75e438094960b2e66a898"><td class="mdescLeft"> </td><td class="mdescRight">Set to true automatically if one of the prefixes added is "/". <a href="classdpp_1_1commandhandler.html#a29e869380af75e438094960b2e66a898">More...</a><br /></td></tr>
<tr class="separator:a29e869380af75e438094960b2e66a898"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a81203fb77ae98d8cfe81d95bf714fcf0"><td class="memItemLeft" align="right" valign="top">class <a class="el" href="classdpp_1_1cluster.html">cluster</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1commandhandler.html#a81203fb77ae98d8cfe81d95bf714fcf0">owner</a></td></tr>
<tr class="memdesc:a81203fb77ae98d8cfe81d95bf714fcf0"><td class="mdescLeft"> </td><td class="mdescRight">Cluster we are attached to for issuing REST calls. <a href="classdpp_1_1commandhandler.html#a81203fb77ae98d8cfe81d95bf714fcf0">More...</a><br /></td></tr>
<tr class="separator:a81203fb77ae98d8cfe81d95bf714fcf0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa77b113d11ae040d9eb32a462bd88a7c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdpp_1_1snowflake.html">snowflake</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1commandhandler.html#aa77b113d11ae040d9eb32a462bd88a7c">app_id</a></td></tr>
<tr class="memdesc:aa77b113d11ae040d9eb32a462bd88a7c"><td class="mdescLeft"> </td><td class="mdescRight">Application ID. <a href="classdpp_1_1commandhandler.html#aa77b113d11ae040d9eb32a462bd88a7c">More...</a><br /></td></tr>
<tr class="separator:aa77b113d11ae040d9eb32a462bd88a7c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af8ca0a5c050b1774794de79e221a4b4e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacedpp.html#a4641626be7775de0b8b63a6e68d0934e">event_handle</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1commandhandler.html#af8ca0a5c050b1774794de79e221a4b4e">interactions</a></td></tr>
<tr class="memdesc:af8ca0a5c050b1774794de79e221a4b4e"><td class="mdescLeft"> </td><td class="mdescRight">Interaction event handle. <a href="classdpp_1_1commandhandler.html#af8ca0a5c050b1774794de79e221a4b4e">More...</a><br /></td></tr>
<tr class="separator:af8ca0a5c050b1774794de79e221a4b4e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac2ed801cb8ac1697bd92799acfae2c0a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacedpp.html#a4641626be7775de0b8b63a6e68d0934e">event_handle</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdpp_1_1commandhandler.html#ac2ed801cb8ac1697bd92799acfae2c0a">messages</a></td></tr>
<tr class="memdesc:ac2ed801cb8ac1697bd92799acfae2c0a"><td class="mdescLeft"> </td><td class="mdescRight">Message event handle. <a href="classdpp_1_1commandhandler.html#ac2ed801cb8ac1697bd92799acfae2c0a">More...</a><br /></td></tr>
<tr class="separator:ac2ed801cb8ac1697bd92799acfae2c0a"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >The commandhandler class represents a group of commands, prefixed or slash commands with handling functions. </p>
<p >It can automatically register slash commands, and handle routing of messages and interactions to separated command handler functions. </p><dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000025">Deprecated:</a></b></dt><dd>commandhandler and message commands are deprecated and <a class="el" href="classdpp_1_1slashcommand.html" title="Represents an application command, created by your bot either globally, or on a guild.">dpp::slashcommand</a> is encouraged as a replacement. </dd></dl>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a id="a7300779eb1aaf04041e48c756abafafb" name="a7300779eb1aaf04041e48c756abafafb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7300779eb1aaf04041e48c756abafafb">◆ </a></span>commandhandler()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">dpp::commandhandler::commandhandler </td>
<td>(</td>
<td class="paramtype">class <a class="el" href="classdpp_1_1cluster.html">cluster</a> * </td>
<td class="paramname"><em>o</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>auto_hook_events</em> = <code>true</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classdpp_1_1snowflake.html">snowflake</a> </td>
<td class="paramname"><em>application_id</em> = <code>0</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Construct a new commandhandler object. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">o</td><td>Owning cluster to attach to </td></tr>
<tr><td class="paramname">auto_hook_events</td><td>Set to true to automatically hook the on_slashcommand and on_message events. You should not need to set this to false unless you have a specific use case, as D++ supports multiple listeners to an event, so will allow the commandhandler to hook to your command events without disrupting other uses for the events you may have. </td></tr>
<tr><td class="paramname">application_id</td><td>The application id of the bot. If not specified, the class will look within the cluster object and use cluster::me::id instead. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a62373f8cdd5b887eb78eb4f4cb265baf" name="a62373f8cdd5b887eb78eb4f4cb265baf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a62373f8cdd5b887eb78eb4f4cb265baf">◆ </a></span>~commandhandler()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">dpp::commandhandler::~commandhandler </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destroy the commandhandler object. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a791ed0c75ef77306af84be30ded619f8" name="a791ed0c75ef77306af84be30ded619f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a791ed0c75ef77306af84be30ded619f8">◆ </a></span>add_command()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1commandhandler.html">commandhandler</a> & dpp::commandhandler::add_command </td>
<td>(</td>
<td class="paramtype">const std::string & </td>
<td class="paramname"><em>command</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacedpp.html#a6daf230da747f01eeaa36fd3d5e51a65">parameter_registration_t</a> & </td>
<td class="paramname"><em>parameters</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacedpp.html#a72a8ab3231965d0e361f305a7fe431f3">command_handler</a> </td>
<td class="paramname"><em>handler</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string & </td>
<td class="paramname"><em>description</em> = <code>""</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classdpp_1_1snowflake.html">snowflake</a> </td>
<td class="paramname"><em>guild_id</em> = <code>0</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add a command to the command handler. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">command</td><td>Command to be handled. Note that if any one of your prefixes is "/" this will attempt to register a global command using the API and you will receive notification of this command via an interaction event. </td></tr>
<tr><td class="paramname">handler</td><td>Handler function </td></tr>
<tr><td class="paramname">parameters</td><td>Parameters to use for the command </td></tr>
<tr><td class="paramname">description</td><td>The description of the command, shown for slash commands </td></tr>
<tr><td class="paramname">guild_id</td><td>The guild ID to restrict the command to. For slash commands causes registration of a guild command as opposed to a global command. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>commandhandler& reference to self </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classdpp_1_1logic__exception.html" title="Represents an error in logic, e.g. you asked the library to do something the Discord API does not sup...">dpp::logic_exception</a></td><td>if application ID cannot be determined </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a69ce2bb96adb1a658b3a29c37274f2bb" name="a69ce2bb96adb1a658b3a29c37274f2bb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69ce2bb96adb1a658b3a29c37274f2bb">◆ </a></span>add_prefix()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1commandhandler.html">commandhandler</a> & dpp::commandhandler::add_prefix </td>
<td>(</td>
<td class="paramtype">const std::string & </td>
<td class="paramname"><em>prefix</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add a prefix to the command handler. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">prefix</td><td>Prefix to be handled by the command handler </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>commandhandler& reference to self </dd></dl>
</div>
</div>
<a id="a208f3684f3987d87074824bd13699e42" name="a208f3684f3987d87074824bd13699e42"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a208f3684f3987d87074824bd13699e42">◆ </a></span>register_commands()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1commandhandler.html">commandhandler</a> & dpp::commandhandler::register_commands </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Register all slash commands with Discord This method must be called at least once if you are using the "/" prefix to mark the end of commands being added to the handler. Note that this uses bulk registration and will replace any existing slash commands. </p>
<p >Note that if you have previously registered your commands and they have not changed, you do not need to call this again. Discord retains a cache of previously added commands.</p>
<dl class="section return"><dt>Returns</dt><dd>commandhandler& Reference to self for chaining method calls </dd></dl>
</div>
</div>
<a id="ad8ddefafe9e85a86829775f385fe5f23" name="ad8ddefafe9e85a86829775f385fe5f23"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad8ddefafe9e85a86829775f385fe5f23">◆ </a></span>reply()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void dpp::commandhandler::reply </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structdpp_1_1message.html">dpp::message</a> & </td>
<td class="paramname"><em>m</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structdpp_1_1command__source.html">command_source</a> </td>
<td class="paramname"><em>source</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacedpp.html#a022dce6b086ec4515384eaece59c84c3">command_completion_event_t</a> </td>
<td class="paramname"><em>callback</em> = <code><a class="el" href="namespacedpp_1_1utility.html#ab1b44934665a2561416383fb2229523e">utility::log_error</a>()</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Reply to a command. You should use this method rather than <a class="el" href="classdpp_1_1cluster.html#aa6ae3dc32ebc2dd14264962710d35af7" title="Send a message to a channel. The callback function is called when the message has been sent.">cluster::message_create</a> as the way you reply varies between slash commands and message commands. Note you should ALWAYS reply. Slash commands will emit an ugly error to the user if you do not emit some form of reply within 3 seconds. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">m</td><td>message to reply with. </td></tr>
<tr><td class="paramname">source</td><td>source of the command </td></tr>
<tr><td class="paramname">callback</td><td>User function to execute when the api call completes. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a957dfe206c80cd7176e7ab663e9a1bf2" name="a957dfe206c80cd7176e7ab663e9a1bf2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a957dfe206c80cd7176e7ab663e9a1bf2">◆ </a></span>route() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void dpp::commandhandler::route </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="structdpp_1_1message__create__t.html">dpp::message_create_t</a> & </td>
<td class="paramname"><em>event</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Route a command from the on_message_create function. Call this method from within your on_message_create with the received <a class="el" href="structdpp_1_1message.html" title="Represents messages sent and received on Discord.">dpp::message</a> object if you have disabled automatic registration of events. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">event</td><td>message create event to parse </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a2a49a132a938c1952f77a31de8335cce" name="a2a49a132a938c1952f77a31de8335cce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2a49a132a938c1952f77a31de8335cce">◆ </a></span>route() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void dpp::commandhandler::route </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="structdpp_1_1slashcommand__t.html">slashcommand_t</a> & </td>
<td class="paramname"><em>event</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Route a command from the on_slashcommand function. Call this method from your on_slashcommand with the received <a class="el" href="structdpp_1_1interaction__create__t.html" title="Create interaction.">dpp::interaction_create_t</a> object if you have disabled automatic registration of events. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">event</td><td>command interaction event to parse </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a8640d327288a6dd1c5fdbde85726e7de" name="a8640d327288a6dd1c5fdbde85726e7de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8640d327288a6dd1c5fdbde85726e7de">◆ </a></span>set_owner()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1commandhandler.html">commandhandler</a> & dpp::commandhandler::set_owner </td>
<td>(</td>
<td class="paramtype">class <a class="el" href="classdpp_1_1cluster.html">cluster</a> * </td>
<td class="paramname"><em>o</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the application id after construction. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">o</td><td>Owning cluster to attach to </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a064419ada0fd30cee04faec9f75ba04d" name="a064419ada0fd30cee04faec9f75ba04d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a064419ada0fd30cee04faec9f75ba04d">◆ </a></span>string_has_prefix()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool dpp::commandhandler::string_has_prefix </td>
<td>(</td>
<td class="paramtype">std::string & </td>
<td class="paramname"><em>str</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns true if the string has a known prefix on the start. Modifies string to remove prefix if it returns true. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">str</td><td>String to check and modify </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true string contained a prefix, prefix removed from string </dd>
<dd>
false string did not contain a prefix </dd></dl>
</div>
</div>
<a id="af41ce62f462d7bb8ea2046a9c7311c4f" name="af41ce62f462d7bb8ea2046a9c7311c4f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af41ce62f462d7bb8ea2046a9c7311c4f">◆ </a></span>thinking()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void dpp::commandhandler::thinking </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structdpp_1_1command__source.html">command_source</a> </td>
<td class="paramname"><em>source</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacedpp.html#a022dce6b086ec4515384eaece59c84c3">command_completion_event_t</a> </td>
<td class="paramname"><em>callback</em> = <code><a class="el" href="namespacedpp_1_1utility.html#ab1b44934665a2561416383fb2229523e">utility::log_error</a>()</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Reply to a command without a message, causing the discord client to display "Bot name is thinking...". The "thinking" message will persist for a maximum of 15 minutes. This counts as a reply for a slash command. Slash commands will emit an ugly error to the user if you do not emit some form of reply within 3 seconds. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">source</td><td>source of the command </td></tr>
<tr><td class="paramname">callback</td><td>User function to execute when the api call completes. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="aa77b113d11ae040d9eb32a462bd88a7c" name="aa77b113d11ae040d9eb32a462bd88a7c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa77b113d11ae040d9eb32a462bd88a7c">◆ </a></span>app_id</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classdpp_1_1snowflake.html">snowflake</a> dpp::commandhandler::app_id</td>
</tr>
</table>
</div><div class="memdoc">
<p>Application ID. </p>
</div>
</div>
<a id="aaeb676a799cda302d4b08106f898a867" name="aaeb676a799cda302d4b08106f898a867"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaeb676a799cda302d4b08106f898a867">◆ </a></span>commands</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::unordered_map<std::string, <a class="el" href="structdpp_1_1command__info__t.html">command_info_t</a>> dpp::commandhandler::commands</td>
</tr>
</table>
</div><div class="memdoc">
<p>Commands in the handler. </p>
</div>
</div>
<a id="af8ca0a5c050b1774794de79e221a4b4e" name="af8ca0a5c050b1774794de79e221a4b4e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af8ca0a5c050b1774794de79e221a4b4e">◆ </a></span>interactions</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespacedpp.html#a4641626be7775de0b8b63a6e68d0934e">event_handle</a> dpp::commandhandler::interactions</td>
</tr>
</table>
</div><div class="memdoc">
<p>Interaction event handle. </p>
</div>
</div>
<a id="ac2ed801cb8ac1697bd92799acfae2c0a" name="ac2ed801cb8ac1697bd92799acfae2c0a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac2ed801cb8ac1697bd92799acfae2c0a">◆ </a></span>messages</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespacedpp.html#a4641626be7775de0b8b63a6e68d0934e">event_handle</a> dpp::commandhandler::messages</td>
</tr>
</table>
</div><div class="memdoc">
<p>Message event handle. </p>
</div>
</div>
<a id="a81203fb77ae98d8cfe81d95bf714fcf0" name="a81203fb77ae98d8cfe81d95bf714fcf0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a81203fb77ae98d8cfe81d95bf714fcf0">◆ </a></span>owner</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">class <a class="el" href="classdpp_1_1cluster.html">cluster</a>* dpp::commandhandler::owner</td>
</tr>
</table>
</div><div class="memdoc">
<p>Cluster we are attached to for issuing REST calls. </p>
</div>
</div>
<a id="acbbac80b9d8fd5b3f82fd5bfc919f9bc" name="acbbac80b9d8fd5b3f82fd5bfc919f9bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acbbac80b9d8fd5b3f82fd5bfc919f9bc">◆ </a></span>prefixes</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector<std::string> dpp::commandhandler::prefixes</td>
</tr>
</table>
</div><div class="memdoc">
<p>Valid prefixes. </p>
</div>
</div>
<a id="a29e869380af75e438094960b2e66a898" name="a29e869380af75e438094960b2e66a898"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a29e869380af75e438094960b2e66a898">◆ </a></span>slash_commands_enabled</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool dpp::commandhandler::slash_commands_enabled</td>
</tr>
</table>
</div><div class="memdoc">
<p>Set to true automatically if one of the prefixes added is "/". </p>
</div>
</div>
</div><!-- contents --><script src="https://giscus.app/client.js" data-repo="brainboxdotcc/dpp-comments" data-repo-id="R_kgDOHOY4xg" data-category="General" data-category-id="DIC_kwDOHOY4xs4CRYtj" data-mapping="pathname" data-strict="1" data-reactions-enabled="1" data-emit-metadata="1" data-input-position="top" data-theme="preferred_color_scheme" data-lang="en" data-loading="lazy" crossorigin="anonymous" async></script>
</div><!-- doc-content -->
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacedpp.html">dpp</a></li><li class="navelem"><a class="el" href="classdpp_1_1commandhandler.html">commandhandler</a></li>
</ul>
</div>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-QTH6YHBNG5"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/styles/base16/dracula.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlightjs-line-numbers.js/2.8.0/highlightjs-line-numbers.min.js"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@100&display=swap" rel="stylesheet">
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-QTH6YHBNG5');
$(function() {
$(".fragment").each(function(i,node) {
var $node = $(node);
$node.children(":not(.line)").remove();
$node.html("<pre><code class='stan'>" + $node.text().trim().replaceAll("<", "<").replaceAll(">", ">") + "</code></pre>");
hljs.configure({
languages: ['cpp','diff','cmake','bash','sh','text'],
ignoreUnescapedHTML: true
});
hljs.highlightAll(node);
hljs.initLineNumbersOnLoad(node);
});
$(".fragment").parent().parent().parent().parent().removeClass('doxtable');
});
</script>
<style>
.hljs-ln-code, code, code a, pre.fragment, div.fragment, div.fragment .line, div.fragment span, div.fragment .line a, div.fragment .line span {
font-family: 'JetBrains Mono', monospace !important;
font-size: 0.8rem !important;
}
.fragment {
padding: 0 !important;
margin-top: 0 !important;
margin-bottom: 0 !important;
background: none !important;
border: 0 !important;
}
.hljs-ln-n::before {
content: attr(data-line-number);
padding-right: 1rem !important;
}
table.markdownTable code td, table.markdownTable code th, table.fieldtable code td, table.fieldtable code th, table.doxtable code td, table.doxtable code th {
border: 0 !important;
padding: 0 !important;
}
</style>
<div style="z-index: -9999; position: absolute; right: 0; top: 0; font-size: 0.0001rem;color:transparent;background:none">
<!-- For crawlability of past versions -->
<a href='/10.0.31/'>D++ Library version 10.0.31</a><a href='/10.0.30/'>D++ Library version 10.0.30</a><a href='/10.0.29/'>D++ Library version 10.0.29</a><a href='/10.0.28/'>D++ Library version 10.0.28</a><a href='/10.0.27/'>D++ Library version 10.0.27</a><a href='/10.0.26/'>D++ Library version 10.0.26</a><a href='/10.0.25/'>D++ Library version 10.0.25</a><a href='/10.0.24/'>D++ Library version 10.0.24</a><a href='/10.0.23/'>D++ Library version 10.0.23</a><a href='/10.0.22/'>D++ Library version 10.0.22</a><a href='/10.0.21/'>D++ Library version 10.0.21</a><a href='/10.0.20/'>D++ Library version 10.0.20</a><a href='/10.0.19/'>D++ Library version 10.0.19</a><a href='/10.0.18/'>D++ Library version 10.0.18</a><a href='/10.0.17/'>D++ Library version 10.0.17</a><a href='/10.0.16/'>D++ Library version 10.0.16</a><a href='/10.0.15/'>D++ Library version 10.0.15</a><a href='/10.0.14/'>D++ Library version 10.0.14</a><a href='/10.0.13/'>D++ Library version 10.0.13</a><a href='/10.0.12/'>D++ Library version 10.0.12</a><a href='/10.0.11/'>D++ Library version 10.0.11</a><a href='/10.0.10/'>D++ Library version 10.0.10</a><a href='/10.0.9/'>D++ Library version 10.0.9</a><a href='/10.0.8/'>D++ Library version 10.0.8</a><a href='/10.0.7/'>D++ Library version 10.0.7</a><a href='/10.0.6/'>D++ Library version 10.0.6</a><a href='/10.0.5/'>D++ Library version 10.0.5</a><a href='/10.0.4/'>D++ Library version 10.0.4</a><a href='/10.0.3/'>D++ Library version 10.0.3</a><a href='/10.0.2/'>D++ Library version 10.0.2</a><a href='/10.0.1/'>D++ Library version 10.0.1</a><a href='/10.0.0/'>D++ Library version 10.0.0</a><a href='/9.0.19/'>D++ Library version 9.0.19</a><a href='/9.0.18/'>D++ Library version 9.0.18</a><a href='/9.0.17/'>D++ Library version 9.0.17</a><a href='/9.0.16/'>D++ Library version 9.0.16</a><a href='/9.0.15/'>D++ Library version 9.0.15</a><a href='/9.0.14/'>D++ Library version 9.0.14</a><a href='/9.0.13/'>D++ Library version 9.0.13</a><a href='/9.0.12/'>D++ Library version 9.0.12</a><a href='/9.0.11/'>D++ Library version 9.0.11</a><a href='/9.0.10/'>D++ Library version 9.0.10</a><a href='/9.0.9/'>D++ Library version 9.0.9</a><a href='/9.0.8/'>D++ Library version 9.0.8</a><a href='/9.0.7/'>D++ Library version 9.0.7</a><a href='/9.0.6/'>D++ Library version 9.0.6</a><a href='/9.0.5/'>D++ Library version 9.0.5</a><a href='/9.0.4/'>D++ Library version 9.0.4</a><a href='/9.0.3/'>D++ Library version 9.0.3</a><a href='/9.0.2/'>D++ Library version 9.0.2</a><a href='/9.0.1/'>D++ Library version 9.0.1</a><a href='/9.0.0/'>D++ Library version 9.0.0</a><a href='/1.0.2/'>D++ Library version 1.0.2</a><a href='/1.0.1/'>D++ Library version 1.0.1</a><a href='/1.0.0/'>D++ Library version 1.0.0</a>
</div>
</body>
</html>