D++ (DPP)
C++ Discord API Bot Library
|
An interaction represents a user running a command and arrives via the dpp::cluster::on_interaction_create event. More...
#include <slashcommand.h>
Public Member Functions | |
interaction & | fill_from_json (nlohmann::json *j) |
Fill object properties from JSON. More... | |
std::string | build_json (bool with_id=false) const |
Build a json string for this object. More... | |
Public Attributes | |
snowflake | application_id |
id of the application this interaction is for More... | |
uint8_t | type |
the type of interaction More... | |
std::variant< command_interaction, button_interaction > | data |
Optional: the command data payload. More... | |
snowflake | guild_id |
Optional: the guild it was sent from. More... | |
snowflake | channel_id |
Optional: the channel it was sent from. More... | |
guild_member | member |
Optional: guild member data for the invoking user, including permissions. More... | |
user | usr |
Optional: user object for the invoking user, if invoked in a DM. More... | |
std::string | token |
a continuation token for responding to the interaction More... | |
uint8_t | version |
read-only property, always 1 More... | |
snowflake | id |
An interaction represents a user running a command and arrives via the dpp::cluster::on_interaction_create event.
std::string dpp::interaction::build_json | ( | bool | with_id = false | ) | const |
Build a json string for this object.
with_id | True if to include the ID in the JSON |
interaction & dpp::interaction::fill_from_json | ( | nlohmann::json * | j | ) |
Fill object properties from JSON.
j | JSON to fill from |
snowflake dpp::interaction::application_id |
id of the application this interaction is for
snowflake dpp::interaction::channel_id |
Optional: the channel it was sent from.
std::variant<command_interaction, button_interaction> dpp::interaction::data |
Optional: the command data payload.
snowflake dpp::interaction::guild_id |
Optional: the guild it was sent from.
|
inherited |
Unique ID of object
guild_member dpp::interaction::member |
Optional: guild member data for the invoking user, including permissions.
std::string dpp::interaction::token |
a continuation token for responding to the interaction
uint8_t dpp::interaction::type |
the type of interaction
user dpp::interaction::usr |
Optional: user object for the invoking user, if invoked in a DM.
uint8_t dpp::interaction::version |
read-only property, always 1