A Discord bot library written in C++, with custom asynchronous coroutines.
No Matches
DiscordCoreAPI::ModalCollector Class Reference

ModalCollector, for collecting modal text input from one or more Users. More...

#include <InteractionEntities.hpp>

Public Member Functions

CoRoutine< ModalResponseDatacollectModalData (int32_t maxWaitTimeInMsNew)
 Used to collect the button inputs from one or more users.
void collectModalData (std::function< bool(InteractionData)> triggerFunctionNew, DiscordCoreInternal::TriggerEventDelegate< void, InteractionData > functionNew)
 Used to collect the modal from one or more users.
 ModalCollector (InputEventData &dataPackage)

Constructor & Destructor Documentation

◆ ModalCollector()

DiscordCoreAPI::ModalCollector::ModalCollector ( InputEventData dataPackage)
dataPackageAn InputEventData structure, from the response that came from the submitted button.

Definition at line 717 of file InteractionEntities.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ collectModalData() [1/2]

CoRoutine< ModalResponseData > DiscordCoreAPI::ModalCollector::collectModalData ( int32_t  maxWaitTimeInMsNew)
maxWaitTimeInMsNewThe maximum amount of time to wait for new inputs, in milliseconds.
A vector of ButtonResponseData.

Definition at line 722 of file InteractionEntities.cpp.

◆ collectModalData() [2/2]

void DiscordCoreAPI::ModalCollector::collectModalData ( std::function< bool(InteractionData)>  triggerFunctionNew,
DiscordCoreInternal::TriggerEventDelegate< void, InteractionData functionNew 
triggerFunctionNewA std::function<bool(InteractionData)> to decide whether or not to trigger the event's main function.
functionNewTakes a DiscordCoreInternal::TriggerEventDelegate<void, InteractionData> as a function to be executed upon returning true from the "trigger-function".

Definition at line 729 of file InteractionEntities.cpp.

The documentation for this class was generated from the following files: