#include <Interaction.h>
|
std::string | get_token () const |
|
json | api_call (const std::string &url, const std::string &method="GET", const json &data=json(), const std::string &content_type="", const bool cache=true) |
| helper function to communicate with the http api
|
|
◆ Type
Enumerator |
---|
PING | |
APPLICATION_COMMAND | |
MESSAGE_COMPONENT | |
APPLICATION_COMMAND_AUTOCOMPLETE | |
MODAL_SUBMIT | |
◆ Interaction()
DiscordCPP::Interaction::Interaction |
( |
const json & | data, |
|
|
const std::string & | token ) |
◆ get_application_id()
std::string DiscordCPP::Interaction::get_application_id |
( |
| ) |
|
|
inline |
- Returns
- ID of the application this interaction is for.
◆ get_channel_id()
std::optional< std::string > DiscordCPP::Interaction::get_channel_id |
( |
| ) |
|
|
inline |
- Returns
- The channel the interaction was sent from.
◆ get_data()
- Returns
- The command data payload.
◆ get_guild_id()
std::optional< std::string > DiscordCPP::Interaction::get_guild_id |
( |
| ) |
|
|
inline |
- Returns
- The guild the interaction was sent from.
◆ get_guild_locale()
std::optional< std::string > DiscordCPP::Interaction::get_guild_locale |
( |
| ) |
|
|
inline |
- Returns
- The guild's preferred locale.
◆ get_locale()
std::optional< std::string > DiscordCPP::Interaction::get_locale |
( |
| ) |
|
|
inline |
- Returns
- The selected locale of the user who sent this interaction.
◆ get_member()
std::optional< Member > DiscordCPP::Interaction::get_member |
( |
| ) |
|
|
inline |
- Returns
- The member that sent the interaction.
◆ get_message()
std::optional< Message > DiscordCPP::Interaction::get_message |
( |
| ) |
|
|
inline |
- Returns
- For components, the message they were attached to.
◆ get_type()
Type DiscordCPP::Interaction::get_type |
( |
| ) |
|
|
inline |
- Returns
- The type of the invoked command.
◆ get_user()
std::optional< User > DiscordCPP::Interaction::get_user |
( |
| ) |
|
|
inline |
- Returns
- The user that sent the interaction.
◆ reply() [1/2]
void DiscordCPP::Interaction::reply |
( |
const std::string & | content, |
|
|
const bool | tts = false ) |
Send a Message as a reply to this interaction.
◆ reply() [2/2]
void DiscordCPP::Interaction::reply |
( |
Embed | embed | ) |
|
Send an Embed as a reply to this interaction.
◆ update_reply() [1/2]
void DiscordCPP::Interaction::update_reply |
( |
const std::string & | content, |
|
|
const bool | tts = false ) |
Update a previously sent reply for this interaction.
◆ update_reply() [2/2]
void DiscordCPP::Interaction::update_reply |
( |
Embed | embed | ) |
|
Update a previously sent reply for this interaction.
The documentation for this class was generated from the following files: