DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
|
discord_core_api::button_collector
class, passing into its constructor the discord_core_api::input_event_data
that resulted from the call to discord_core_api::input_events::respondToInputEventAsync
, when the button was created.discord_core_api::button_collector::collectButtonData()
function from the instance of the button_collector. note: the arguments for this function are as follows: getButtonDataForAllNew
= whether or not it accepts button presses from everyone or just the individual selected with the discord_core_api::targetUser
argument. maxWaitTimeInMsNew
= the maximum number of milliseconds that the collector will wait for button presses. maxNumberOfPressesNew
= the maximum number of button presses that the collector will collect. targetUser
= the target user, if discord_core_api::getButtonDataForAllNew
is disabled.jsonifier::vector<button_response_data>
and deal with the button responses as you see fit! keep in mind that you could set up a voting message by using discord_core_api::getButtonDataForAllNew
and having multiple presses allowed.