![]()  | 
  
    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>
 Inheritance diagram for dpp::interaction:
 Collaboration diagram for dpp::interaction:Public Member Functions | |
| std::string | build_json (bool with_id=false) const | 
| Build a json string for this object.  More... | |
| interaction & | fill_from_json (nlohmann::json *j) | 
| Fill object properties from JSON.  More... | |
Public Attributes | |
| snowflake | application_id | 
| id of the application this interaction is for  More... | |
| snowflake | channel_id | 
| Optional: the channel it was sent from.  More... | |
| std::variant< command_interaction, component_interaction, autocomplete_interaction > | data | 
| Optional: the command data payload.  More... | |
| snowflake | guild_id | 
| Optional: the guild it was sent from.  More... | |
| snowflake | id | 
| guild_member | member | 
| Optional: guild member data for the invoking user, including permissions.  More... | |
| snowflake | message_id | 
| Originating message id.  More... | |
| command_resolved | resolved | 
| Resolved user/role etc.  More... | |
| std::string | token | 
| a continuation token for responding to the interaction  More... | |
| uint8_t | type | 
| the type of interaction  More... | |
| user | usr | 
| Optional: user object for the invoking user, if invoked in a DM.  More... | |
| uint8_t | version | 
| read-only property, always 1  More... | |
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, component_interaction, autocomplete_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.
| snowflake dpp::interaction::message_id | 
Originating message id.
| command_resolved dpp::interaction::resolved | 
Resolved user/role etc.
| 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