DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
Loading...
Searching...
No Matches
InteractionEntities.hpp
Go to the documentation of this file.
1/*
2 DiscordCoreAPI, A bot library for Discord, written in C++, and featuring explicit multithreading through the usage of custom, asynchronous C++ CoRoutines.
3
4 Copyright 2021, 2022 Chris M. (RealTimeChris)
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
19 USA
20*/
21/// InteractionEntities.hpp - Header for the interaction related classes and
22/// structs. May 28, 2021 Chris M.
23/// https://discordcoreapi.com
24/// \file InteractionEntities.hpp
25
26#pragma once
27
28#ifndef INTERACTION_ENTITIES
29 #define INTERACTION_ENTITIES
30
34
35namespace DiscordCoreAPI {
36
37 /**
38 * \addtogroup foundation_entities
39 * @{
40 */
41
42 using AutoCompleteEntryFunction = std::function<String(String)>;
43
44 class DiscordCoreAPI_Dll InteractionResponseBase {
45 public:
46 /// Adds a button to the response Message. \brief Adds a button to the response Message.
47 /// \param disabled Whether the button is active or not.
48 /// \param customIdNew A custom id to give for identifying the button.
49 /// \param buttonLabel A visible label for the button.
50 /// \param buttonStyle The style of the button.
51 /// \param emojiName An emoji name, if desired.
52 /// \param emojiId An emoji id, if desired.
53 /// \param url A url, if applicable.
54 InteractionResponseBase& addButton(Bool disabled, const String& customIdNew, const String& buttonLabel, ButtonStyle buttonStyle, const String& emojiName = "",
55 Snowflake emojiId = Snowflake{ 0 }, const String& url = "");
56
57 /// Adds a select-menu to the response Message. \brief Adds a select-menu to the response Message.
58 /// \param disabled Whether the select-menu is active or not.
59 /// \param customIdNew A custom id to give for identifying the select-menu.
60 /// \param options A vector of select-menu-options to offer.
61 /// \param placeholder Custom placeholder text if nothing is selected, max 100 characters.
62 /// \param maxValues Maximum number of selections that are possible.
63 /// \param minValues Minimum required number of selections that are required.
64 InteractionResponseBase& addSelectMenu(Bool disabled, const String& customIdNew, std::vector<SelectOptionData> options, const String& placeholder, Int32 maxValues,
65 Int32 minValues);
66
67 /// Adds a modal to the response Message. \brief Adds a modal to the response Message.
68 /// \param topTitleNew A title for the modal.
69 /// \param topCustomIdNew A custom id to give for the modal.
70 /// \param titleNew A title for the modal's individual input.
71 /// \param customIdNew A custom id to give for the modal's individual input.
72 /// \param required Is it a required response?
73 /// \param minLength Minimum length.
74 /// \param maxLength Maximum length.
75 /// \param inputStyle The input style.
76 /// \param label A label for the modal.
77 /// \param placeholder A placeholder for the modal.
78 /// \returns RespondToInputEventData& A reference to this data structure.
79 InteractionResponseBase& addModal(const String& topTitleNew, const String& topCustomIdNew, const String& titleNew, const String& customIdNew, Bool required,
80 Int32 minLength, Int32 maxLength, TextInputStyle inputStyle, const String& label = "", const String& placeholder = "");
81
82 /// Adds a file to the current collection of files for this message response. \brief Adds a file to the current collection of files for this message response.
83 /// \param theFile The file to be added.
84 /// \returns MessageResponseBase& A reference to this data structure.
85 InteractionResponseBase& addFile(const File& theFile);
86
87 /// For setting the allowable mentions in a response. \brief For setting the allowable mentions in a response.
88 /// \param dataPackage An AllowedMentionsData structure.
89 InteractionResponseBase& addAllowedMentions(const AllowedMentionsData& dataPackage);
90
91 /// For setting the components in a response. \brief For setting the components in a response.
92 /// \param dataPackage An ActionRowData structure.
93 InteractionResponseBase& addComponentRow(const ActionRowData& dataPackage);
94
95 /// Sets the response type of the current Message. \brief Sets the response type of the current Message.
96 /// \param type Interaction callback type.
97 InteractionResponseBase& setResponseType(InteractionCallbackType type);
98
99 /// For setting the embeds in a response. \brief For setting the embeds in a response.
100 /// \param dataPackage An EmbedData structure.SendDMData
101 InteractionResponseBase& addMessageEmbed(const EmbedData& dataPackage);
102
103 /// For setting the Message content in a response. \brief For setting the content in a response.
104 /// \param dataPackage A string, containing the content.
105 InteractionResponseBase& addContent(const String& dataPackage);
106
107 /// For setting the tts status of a response. \brief For setting the tts status of a response.
108 /// \param enabledTTs A Bool.
109 InteractionResponseBase& setTTSStatus(Bool enabledTTs);
110
111 InteractionResponseData getInteractionResponseData();
112
113 virtual ~InteractionResponseBase() noexcept = default;
114
115 protected:
116 InteractionPackageData interactionPackage{};
117 MessagePackageData messagePackage{};
118 InteractionResponseData data{};
119 };
120
121 /// For creating an ephemeral Interaction response. \brief For creating an ephemeral Interaction response.
122 class DiscordCoreAPI_Dll CreateEphemeralInteractionResponseData : public InteractionResponseBase {
123 public:
125 friend class Interactions;
126 friend class InputEvents;
127
129
131
132 virtual ~CreateEphemeralInteractionResponseData() noexcept = default;
133 };
134
135 /// For creating a deferred Interaction response. \brief For creating a deferred Interaction response.
136 class DiscordCoreAPI_Dll CreateDeferredInteractionResponseData {
137 public:
139 friend class Interactions;
140 friend class InputEvents;
141
143
145
146 virtual ~CreateDeferredInteractionResponseData() noexcept = default;
147
148 protected:
149 InteractionPackageData interactionPackage{};
151 };
152
153 /// For creating an Interaction response. \brief For creating an Interaction response.
154 class DiscordCoreAPI_Dll CreateInteractionResponseData : public InteractionResponseBase {
155 public:
156 friend class SelectMenuCollector;
157 friend class ButtonCollector;
158 friend class ModalCollector;
159 friend class Interactions;
160 friend class InputEvents;
161
163
165
167
169
171
173
174 virtual ~CreateInteractionResponseData() noexcept = default;
175 };
176
177 /// For getting an Interaction response. \brief For getting an Interaction response.
178 struct DiscordCoreAPI_Dll GetInteractionResponseData {
179 String interactionToken{};///< Interaction token.
180 Snowflake applicationId{};///< application id.
181 };
182
183 /// For editing an Interaction response. \brief For editing an Interaction response.
184 class DiscordCoreAPI_Dll EditInteractionResponseData {
185 public:
186 friend class Interactions;
187 friend class InputEvents;
188
190
192
193 virtual ~EditInteractionResponseData() noexcept = default;
194
195 protected:
196 InteractionPackageData interactionPackage{};
197 EditWebHookData data{};
198 };
199
200 /// For deleting an Interaction response. \brief For deleting an Interaction response.
201 struct DiscordCoreAPI_Dll DeleteInteractionResponseData {
202 friend class Interactions;
203 friend class InputEvents;
204
206
207 protected:
208 InteractionPackageData interactionPackage{};
209 Uint32 timeDelay{ 0 };
210 };
211
212 /// For creating an ephemeral follow up Message. \brief For creating an ephemeral follow up Message.
213 class DiscordCoreAPI_Dll CreateEphemeralFollowUpMessageData : public ExecuteWebHookData {
214 public:
215 friend class CreateFollowUpMessageData;
216 friend class Interactions;
217 friend class InputEvents;
218
220
222
223 virtual ~CreateEphemeralFollowUpMessageData() noexcept = default;
224
225 protected:
226 InteractionPackageData interactionPackage{};
227 };
228
229 /// For creating a follow up Message. \brief For creating a follow up Message.
230 class DiscordCoreAPI_Dll CreateFollowUpMessageData : public ExecuteWebHookData {
231 public:
232 friend class SelectMenuCollector;
233 friend class ButtonCollector;
234 friend class Interactions;
235 friend class InputEvents;
236
238
240
242
244
245 virtual ~CreateFollowUpMessageData() noexcept = default;
246
247 protected:
248 InteractionPackageData interactionPackage{};
249 };
250
251 /// For getting a follow-up Message. \brief For getting a follow-up Message.
252 struct DiscordCoreAPI_Dll GetFollowUpMessageData {
253 String interactionToken{};///< Interaction token.
254 Snowflake applicationId{};///< application id.
255 Snowflake messageId{};///< Message id.
256 };
257
258 /// For editing a follow up Message. \brief For editing a follow up Message.
259 class DiscordCoreAPI_Dll EditFollowUpMessageData {
260 public:
261 friend class Interactions;
262 friend class InputEvents;
263
265
267
268 virtual ~EditFollowUpMessageData() noexcept = default;
269
270 protected:
271 InteractionPackageData interactionPackage{};
272 MessagePackageData messagePackage{};
273 EditWebHookData data{};
274 };
275
276 /// For deleting a follow up Message. \brief For deleting a follow up Message.
277 struct DiscordCoreAPI_Dll DeleteFollowUpMessageData {
278 friend class Interactions;
279 friend class InputEvents;
280
282
283 protected:
284 InteractionPackageData interactionPackage{};
285 MessagePackageData messagePackage{};
286 Uint32 timeDelay{ 0 };
287 };
288
289 /// A single Interaction.
290 struct DiscordCoreAPI_Dll Interaction : public InteractionData {
291 public:
292 Interaction() noexcept = default;
293
294 virtual ~Interaction() noexcept = default;
295 };
296
297 /**@}*/
298
299 /**
300 * \addtogroup main_endpoints
301 * @{
302 */
303
304 /// An interface class for the Interaction related Discord endpoints. \brief An interface class for the Interaction related Discord endpoints.
305 class DiscordCoreAPI_Dll Interactions {
306 public:
307 friend class DiscordCoreInternal::BaseSocketAgent;
308 friend class DiscordCoreClient;
309 friend class EventManager;
310
311 static void initialize(DiscordCoreInternal::HttpsClient*);
312
313 /// Creates a response to an input Interaction. \brief Creates a response to an input Interaction.
314 /// \param dataPackage A CreateInteractionResponseData structure.
315 /// \returns A CoRoutine containing a MessageData.
316 static CoRoutine<Message> createInteractionResponseAsync(CreateInteractionResponseData dataPackage);
317
318 /// Collects an Interaction response. \brief Collects an Interaction response.
319 /// \param dataPackage A GetInteractionResponseData structure.
320 /// \returns A CoRoutine containing an InteractionResponseData.
321 static CoRoutine<Message> getInteractionResponseAsync(GetInteractionResponseData dataPackage);
322
323 /// Edits an Interaction response. \brief Edits an Interaction response.
324 /// \param dataPackage A EditInteractionResponseData structure.
325 /// \returns A CoRoutine containing a MessageData.
326 static CoRoutine<Message> editInteractionResponseAsync(EditInteractionResponseData dataPackage);
327
328 /// Deletes an Interaction respnose. \brief Deletes an Interaction respnose.
329 /// \param dataPackage A DeleteInteractionResponseData structure.
330 /// \returns A CoRoutine containing void.
331 static CoRoutine<void> deleteInteractionResponseAsync(DeleteInteractionResponseData dataPackage);
332
333 /// Creates a follow up Message to an input Interaction. \brief Creates a follow up Message to an input Interaction.
334 /// \param dataPackage A CreateFollowUpMessageData structure.
335 /// \returns A CoRoutine containing a MessageData.
336 static CoRoutine<Message> createFollowUpMessageAsync(CreateFollowUpMessageData dataPackage);
337
338 /// Creates a follow up Message to an input Interaction. \brief Creates a follow up Message to an input Interaction.
339 /// \param dataPackage A CreateFollowUpMessageData structure.
340 /// \returns A CoRoutine containing a MessageData.
341 static CoRoutine<Message> getFollowUpMessageAsync(GetFollowUpMessageData dataPackage);
342
343 /// Edits a follow up Message. \brief Edits a follow up Message.
344 /// \param dataPackage A EditFollowUpMessageData structure.
345 /// \returns A CoRoutine containing a MessageData.
346 static CoRoutine<Message> editFollowUpMessageAsync(EditFollowUpMessageData dataPackage);
347
348 /// Deletes a follow up Message. \brief Deletes a follow up Message.
349 /// \param dataPackage A DeleteFollowUpMessageData structure.
350 /// \returns A CoRoutine containing void.
351 static CoRoutine<void> deleteFollowUpMessageAsync(DeleteFollowUpMessageData dataPackage);
352
353 protected:
354 static DiscordCoreInternal::HttpsClient* httpsClient;
355 };
356
357 /**@}*/
358
359 /**
360 * \addtogroup utilities
361 * @{
362 */
363
364 /// Select menu response data. \brief Select menu response data.
365 struct DiscordCoreAPI_Dll SelectMenuResponseData {
366 operator InteractionData() {
367 return *this->interactionData;
368 }
369
370 SelectMenuResponseData& operator=(const SelectMenuResponseData& other) {
371 if (this != &other) {
372 *this->interactionData = *other.interactionData;
373 this->selectionId = other.selectionId;
374 this->messageId = other.messageId;
375 this->channelId = other.channelId;
376 this->values = other.values;
377 this->userId = other.userId;
378 }
379 return *this;
380 }
381
383 *this = other;
384 }
385
387 if (this != &other) {
388 *this->interactionData = *other.interactionData;
389 this->selectionId = other.selectionId;
390 this->messageId = other.messageId;
391 this->channelId = other.channelId;
392 this->values = other.values;
393 this->userId = other.userId;
394 }
395 return *this;
396 }
397
399 *this = other;
400 }
401
402 SelectMenuResponseData() noexcept = default;
403
404 std::unique_ptr<InteractionData> interactionData{ std::make_unique<InteractionData>() };///< Interaction data.
405 std::vector<String> values{};///< A vector of the chosen values.
406 String selectionId{};///< Selection id.
407 Snowflake channelId{};///< The Channel id where it took place.
408 Snowflake messageId{};///< The Message id where it took place.
409 Snowflake userId{};///< The User id who selected the menu options.
410 };
411
412 /// SelectMenuCollector, for collecting select-menu input from one or more
413 /// Users. \brief SelectMenuCollector, for collecting select-menu input from one
414 /// or more Users.
415 class DiscordCoreAPI_Dll SelectMenuCollector {
416 public:
417 friend class DiscordCoreClient;
418
419 static std::unordered_map<String, UnboundedMessageBlock<InteractionData>*> selectMenuInteractionBufferMap;
420
421 /// Constructor. \brief Constructor.
422 /// \param dataPackage An InputEventData structure, from the response that came from the submitted select-menu.
424
425 /// Used to collect the select-menu inputs from one or more users. \brief Used to collect the select-menu inputs from one or more users.
426 /// \param getSelectMenuDataForAllNew Whether or not to collect select-menu input from a single target User or all potential users.
427 /// \param maxWaitTimeInMsNew The maximum amount of time to wait for new inputs, in milliseconds.
428 /// \param maxCollectedSelectMenuCountNew The maximum number of inputs to collect before stopping.
429 /// \param targetUserId The id of the single User to collect inputs from, if getSelectMenuDataForAllNew is set to false.
430 /// \returns A vector of SelectMenuResponseData.
431 CoRoutine<std::vector<SelectMenuResponseData>> collectSelectMenuData(Bool getSelectMenuDataForAllNew, Int32 maxWaitTimeInMsNew, Int32 maxCollectedSelectMenuCountNew,
432 Snowflake targetUserId = Snowflake{ 0 });
433
435
436 protected:
437 std::unique_ptr<InteractionData> interactionData{ std::make_unique<InteractionData>() };
438 UnboundedMessageBlock<InteractionData> selectMenuIncomingInteractionBuffer{};
439 std::vector<SelectMenuResponseData> responseVector{};
440 Int32 currentCollectedSelectMenuCount{ 0 };
441 Int32 maxCollectedSelectMenuCount{ 0 };
442 Bool getSelectMenuDataForAll{ false };
443 std::vector<String> values{};
444 String bufferMapKey{};
445 String selectMenuId{};
446 Uint32 maxTimeInMs{ 0 };
447 Bool doWeQuit{ false };
448 Snowflake channelId{};
449 Snowflake messageId{};
450 Snowflake userId{};
451
452 void run();
453 };
454
455 /// Button response data. \brief Button response data.
456 struct DiscordCoreAPI_Dll ButtonResponseData {
457 operator InteractionData() {
458 return *this->interactionData;
459 }
460
461 ButtonResponseData& operator=(const ButtonResponseData& other) {
462 if (this != &other) {
463 *this->interactionData = *other.interactionData;
464 this->messageId = other.messageId;
465 this->channelId = other.channelId;
466 this->emojiName = other.emojiName;
467 this->buttonId = other.buttonId;
468 this->userId = other.userId;
469 }
470 return *this;
471 }
472
474 *this = other;
475 }
476
477 ButtonResponseData& operator=(ButtonResponseData& other) {
478 if (this != &other) {
479 *this->interactionData = *other.interactionData;
480 this->messageId = other.messageId;
481 this->channelId = other.channelId;
482 this->emojiName = other.emojiName;
483 this->buttonId = other.buttonId;
484 this->userId = other.userId;
485 }
486 return *this;
487 }
488
490 *this = other;
491 }
492
493 ButtonResponseData() noexcept = default;
494
495 std::unique_ptr<InteractionData> interactionData{ std::make_unique<InteractionData>() };///< Interaction data.
496 String emojiName{};///< The emoji name, if applicable.
497 String buttonId{};///< The id of the button, for identification.
498 Snowflake channelId{};///< The Channel id where it took place.
499 Snowflake messageId{};///< The Message id where it took place.
500 Snowflake userId{};///< The User id who selected the menu options.
501 };
502
503 /// ButtonCollector, for collecting button input from one or more Users. \brief ButtonCollector, for collecting button input from one or more Users.
504 class DiscordCoreAPI_Dll ButtonCollector {
505 public:
506 friend class DiscordCoreClient;
507
508 static std::unordered_map<String, UnboundedMessageBlock<InteractionData>*> buttonInteractionBufferMap;
509
510 /// Constructor. \brief Constructor.
511 /// \param dataPackage An InputEventData structure, from the response that came from the submitted button.
512 ButtonCollector(InputEventData& dataPackage);
513
514 /// Used to collect the button inputs from one or more users. \brief Used to collect the button inputs from one or more users.
515 /// \param getButtonDataForAllNew Whether or not to collect input from a single target User or all potential users.
516 /// \param maxWaitTimeInMsNew The maximum amount of time to wait for new inputs, in milliseconds.
517 /// \param maxNumberOfPressesNew The maximum number of inputs to collect before stopping.
518 /// \param targetUserId The id of the single User to collect inputs from, if getButtonDataForAllNew is set to false.
519 /// \returns A vector of ButtonResponseData.
520 CoRoutine<std::vector<ButtonResponseData>> collectButtonData(Bool getButtonDataForAllNew, Int32 maxWaitTimeInMsNew, Int32 maxNumberOfPressesNew,
521 Snowflake targetUserId = Snowflake{ 0 });
522
524
525 protected:
526 std::unique_ptr<InteractionData> interactionData{ std::make_unique<InteractionData>() };
527 UnboundedMessageBlock<InteractionData> buttonIncomingInteractionBuffer{};
528 std::vector<ButtonResponseData> responseVector{};
529 Int32 currentCollectedButtonCount{ 0 };
530 Int32 maxCollectedButtonCount{ 0 };
531 Bool getButtonDataForAll{ false };
532 std::vector<String> values{};
533 String bufferMapKey{};
534 Uint32 maxTimeInMs{ 0 };
535 Bool doWeQuit{ false };
536 String buttonId{};
537 Snowflake channelId{};
538 Snowflake messageId{};
539 Snowflake userId{};
540
541 void run();
542 };
543
544 /// Button response data. \brief Button response data.
545 struct DiscordCoreAPI_Dll ModalResponseData {
546 operator InteractionData() {
547 return *this->interactionData;
548 }
549
550 ModalResponseData& operator=(const ModalResponseData& other) {
551 if (this != &other) {
552 *this->interactionData = *other.interactionData;
553 this->customIdSmall = other.customIdSmall;
554 this->channelId = other.channelId;
555 this->customId = other.customId;
556 this->userId = other.userId;
557 this->value = other.value;
558 }
559 return *this;
560 }
561
563 *this = other;
564 }
565
566 ModalResponseData& operator=(ModalResponseData& other) {
567 if (this != &other) {
568 *this->interactionData = *other.interactionData;
569 this->customIdSmall = other.customIdSmall;
570 this->channelId = other.channelId;
571 this->customId = other.customId;
572 this->userId = other.userId;
573 this->value = other.value;
574 }
575 return *this;
576 }
577
579 *this = other;
580 }
581
582 ModalResponseData() noexcept = default;
583
584 std::unique_ptr<InteractionData> interactionData{ std::make_unique<InteractionData>() };///< Interaction data.
585 String customIdSmall{};///< The customId of the particular input.
586 String customId{};///< The customId of the modal component.
587 Snowflake channelId{};///< The Channel id where it took place.
588 String value{};/// The input value of the modal component.
589 Snowflake userId{};///< The User id who selected the menu options.
590 };
591
592 /// ModalCollector, for collecting modal text input from one or more Users. \brief ModalCollector, for collecting modal text input from one or more Users.
593 class DiscordCoreAPI_Dll ModalCollector {
594 public:
595 friend class DiscordCoreClient;
596
597 static std::unordered_map<String, UnboundedMessageBlock<InteractionData>*> modalInteractionBufferMap;
598
599 /// Constructor. \brief Constructor.
600 /// \param dataPackage An InputEventData structure, from the response that came from the submitted button.
601 ModalCollector(InputEventData& dataPackage);
602
603 /// Used to collect the button inputs from one or more users. \brief Used to collect the button inputs from one or more users.
604 /// \param maxWaitTimeInMsNew The maximum amount of time to wait for new inputs, in milliseconds.
605 /// \returns A vector of ButtonResponseData.
606 CoRoutine<ModalResponseData> collectModalData(Int32 maxWaitTimeInMsNew);
607
609
610 protected:
611 UnboundedMessageBlock<InteractionData> modalIncomingInteractionBuffer{};
612 Int32 currentCollectedButtonCount{ 0 };
613 ModalResponseData responseData{};
614 Uint32 maxTimeInMs{ 0 };
615 Bool doWeQuit{ false };
616 Snowflake channelId{};
617
618 void run();
619 };
620
621 /**@}*/
622};// namespace DiscordCoreAPI
623#endif
The main namespace for this library.
A CoRoutine - representing a potentially asynchronous operation/function.
Definition: CoRoutine.hpp:62
DiscordCoreClient - The main class for this library.
Class for handling the assignment of event-handling functions.
For storing Interaction-related values.
For storing Message-related values.
Data representing an input-event, which is any Message or Interaction that is coming into the bot as ...
Data for responding to an input-event.
For handling User input - Messages or Interactions.
Definition: InputEvents.hpp:42
For creating an ephemeral Interaction response.
For creating a deferred Interaction response.
For creating an Interaction response.
For getting an Interaction response.
For editing an Interaction response.
For deleting an Interaction response.
For creating an ephemeral follow up Message.
For getting a follow-up Message.
For editing a follow up Message.
An interface class for the Interaction related Discord endpoints.
std::unique_ptr< InteractionData > interactionData
Interaction data.
Snowflake channelId
The Channel id where it took place.
Snowflake userId
The User id who selected the menu options.
std::vector< String > values
A vector of the chosen values.
Snowflake messageId
The Message id where it took place.
SelectMenuCollector, for collecting select-menu input from one or more Users.
String buttonId
The id of the button, for identification.
Snowflake channelId
The Channel id where it took place.
std::unique_ptr< InteractionData > interactionData
Interaction data.
String emojiName
The emoji name, if applicable.
Snowflake messageId
The Message id where it took place.
Snowflake userId
The User id who selected the menu options.
ButtonCollector, for collecting button input from one or more Users.
Snowflake channelId
The Channel id where it took place.
String customId
The customId of the modal component.
std::unique_ptr< InteractionData > interactionData
Interaction data.
Snowflake userId
The input value of the modal component.
String customIdSmall
The customId of the particular input.
ModalCollector, for collecting modal text input from one or more Users.
A thread-safe messaging block for data-structures.
Definition: Utilities.hpp:1490
For editing a WebHook Message.