![]() |
DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
|
ModalCollector, for collecting modal text input from one or more Users. More...
#include <InteractionEntities.hpp>
Public Member Functions | |
CoRoutine< ModalResponseData > | collectModalData (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. | |
DiscordCoreAPI::ModalCollector::ModalCollector | ( | InputEventData & | dataPackage | ) |
dataPackage | An InputEventData structure, from the response that came from the submitted button. |
Definition at line 717 of file InteractionEntities.cpp.
CoRoutine< ModalResponseData > DiscordCoreAPI::ModalCollector::collectModalData | ( | int32_t | maxWaitTimeInMsNew | ) |
maxWaitTimeInMsNew | The maximum amount of time to wait for new inputs, in milliseconds. |
Definition at line 722 of file InteractionEntities.cpp.
void DiscordCoreAPI::ModalCollector::collectModalData | ( | std::function< bool(InteractionData)> | triggerFunctionNew, |
DiscordCoreInternal::TriggerEventDelegate< void, InteractionData > | functionNew | ||
) |
triggerFunctionNew | A std::function<bool(InteractionData)> to decide whether or not to trigger the event's main function. |
functionNew | Takes 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.