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

ButtonCollector, for collecting button input from one or more Users. More...

#include <InteractionEntities.hpp>

Public Member Functions

 ButtonCollector (InputEventData &dataPackage)
 Constructor. More...
 
CoRoutine< std::vector< ButtonResponseData > > collectButtonData (bool getButtonDataForAllNew, int32_t maxWaitTimeInMsNew, int32_t maxNumberOfPressesNew, Snowflake targetUserId=Snowflake{ 0 })
 Used to collect the button inputs from one or more users. More...
 

Constructor & Destructor Documentation

◆ ButtonCollector()

DiscordCoreAPI::ButtonCollector::ButtonCollector ( InputEventData dataPackage)

Constructor.

Parameters
dataPackageAn InputEventData structure, from the response that came from the submitted button.

Definition at line 661 of file InteractionEntities.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ collectButtonData()

CoRoutine< std::vector< ButtonResponseData > > DiscordCoreAPI::ButtonCollector::collectButtonData ( bool  getButtonDataForAllNew,
int32_t  maxWaitTimeInMsNew,
int32_t  maxNumberOfPressesNew,
Snowflake  targetUserId = Snowflake{ 0 } 
)

Used to collect the button inputs from one or more users.

Parameters
getButtonDataForAllNewWhether or not to collect input from a single target User or all potential users.
maxWaitTimeInMsNewThe maximum amount of time to wait for new inputs, in milliseconds.
maxNumberOfPressesNewThe maximum number of inputs to collect before stopping.
targetUserIdThe id of the single User to collect inputs from, if getButtonDataForAllNew is set to false.
Returns
A vector of ButtonResponseData.

Definition at line 669 of file InteractionEntities.cpp.


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