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

SelectMenuCollector, for collecting select-menu input from one or more Users. More...

#include <InteractionEntities.hpp>

Public Member Functions

CoRoutine< std::vector< SelectMenuResponseData > > collectSelectMenuData (bool getSelectMenuDataForAllNew, int32_t maxWaitTimeInMsNew, int32_t maxCollectedSelectMenuCountNew, CreateInteractionResponseData errorMessageDataNew, Snowflake targetUserId=Snowflake{})
 Used to collect the select-menu inputs from one or more users.
void collectSelectMenuData (std::function< bool(InteractionData)> triggerFunctionNew, DiscordCoreInternal::TriggerEventDelegate< void, InteractionData > functionNew)
 Used to collect the select-menu inputs from one or more users.
 SelectMenuCollector (InputEventData &dataPackage)

Constructor & Destructor Documentation

◆ SelectMenuCollector()

DiscordCoreAPI::SelectMenuCollector::SelectMenuCollector ( InputEventData dataPackage)
dataPackageAn InputEventData structure, from the response that came from the submitted select-menu.

Definition at line 455 of file InteractionEntities.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ collectSelectMenuData() [1/2]

CoRoutine< std::vector< SelectMenuResponseData > > DiscordCoreAPI::SelectMenuCollector::collectSelectMenuData ( bool  getSelectMenuDataForAllNew,
int32_t  maxWaitTimeInMsNew,
int32_t  maxCollectedSelectMenuCountNew,
CreateInteractionResponseData  errorMessageDataNew,
Snowflake  targetUserId = Snowflake{} 
getSelectMenuDataForAllNewWhether or not to collect select-menu input from a single target User or all potential users.
maxWaitTimeInMsNewThe maximum amount of time to wait for new inputs, in milliseconds.
maxCollectedSelectMenuCountNewThe maximum number of inputs to collect before stopping.
errorMessageDataNewThe message-data for when an individual other than the selected individual attemps to use this interaction.
targetUserIdThe id of the single User to collect inputs from, if getSelectMenuDataForAllNew is set to false.
A vector of SelectMenuResponseData.

Definition at line 462 of file InteractionEntities.cpp.

◆ collectSelectMenuData() [2/2]

void DiscordCoreAPI::SelectMenuCollector::collectSelectMenuData ( 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 483 of file InteractionEntities.cpp.

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