A Discord bot library written in C++, with custom asynchronous coroutines.
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)
CoRoutine< std::vector< ButtonResponseData > > collectButtonData (bool getButtonDataForAllNew, int32_t maxWaitTimeInMsNew, int32_t maxNumberOfPressesNew, CreateInteractionResponseData errorMessageDataNew, Snowflake targetUserId=Snowflake{ 0 })
 Used to collect the button inputs from one or more users.

Constructor & Destructor Documentation

◆ ButtonCollector()

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

Definition at line 574 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,
CreateInteractionResponseData  errorMessageDataNew,
Snowflake  targetUserId = Snowflake{ 0 } 
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.
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 getButtonDataForAllNew is set to false.
A vector of ButtonResponseData.

Definition at line 582 of file InteractionEntities.cpp.

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