An interaction represents a user running a command and arrives via the dpp::cluster::on_interaction_create event.
More...
#include <slashcommand.h>
An interaction represents a user running a command and arrives via the dpp::cluster::on_interaction_create event.
◆ build_json()
std::string dpp::interaction::build_json |
( |
bool |
with_id = false | ) |
const |
Build a json string for this object.
- Parameters
-
with_id | True if to include the ID in the JSON |
- Returns
- std::string JSON string
◆ fill_from_json()
Fill object properties from JSON.
- Parameters
-
- Returns
- interaction& Reference to self
◆ get_creation_time()
double dpp::managed::get_creation_time |
( |
| ) |
const |
|
inherited |
Get the creation time of this object according to Discord.
- Returns
- double creation time inferred from the snowflake ID. The minimum possible value is the first second of 2015.
◆ application_id
id of the application this interaction is for
◆ channel_id
Optional: the channel it was sent from.
◆ data
Optional: the command data payload.
◆ guild_id
Optional: the guild it was sent from.
◆ guild_locale
std::string dpp::interaction::guild_locale |
Guild's locale (language) - for guild interactions only.
◆ id
Unique ID of object set by Discord. This value contains a timestamp, worker ID, internal server ID, and an incrementing value. Only the timestamp is relavent to us as useful metadata.
◆ locale
std::string dpp::interaction::locale |
◆ member
Optional: guild member data for the invoking user, including permissions.
◆ message_id
◆ resolved
◆ token
std::string dpp::interaction::token |
a continuation token for responding to the interaction
◆ type
uint8_t dpp::interaction::type |
◆ usr
user dpp::interaction::usr |
Optional: user object for the invoking user, if invoked in a DM.
◆ version
uint8_t dpp::interaction::version |
read-only property, always 1