#include <ApplicationCommand.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 |
---|
CHAT_INPUT | |
USER | |
MESSAGE | |
◆ ApplicationCommand() [1/2]
DiscordCPP::ApplicationCommand::ApplicationCommand |
( |
| ) |
|
|
default |
◆ ApplicationCommand() [2/2]
DiscordCPP::ApplicationCommand::ApplicationCommand |
( |
const json & | data, |
|
|
const std::string & | token ) |
◆ add_option()
Add parameters for the command, max of 25.
◆ delete_command()
void DiscordCPP::ApplicationCommand::delete_command |
( |
| ) |
|
◆ get_application_id()
std::string DiscordCPP::ApplicationCommand::get_application_id |
( |
| ) |
|
|
inline |
- Returns
- The application id.
◆ get_description()
std::string DiscordCPP::ApplicationCommand::get_description |
( |
| ) |
|
|
inline |
- Returns
- The command's description. Empty string for USER and MESSAGE commands.
◆ get_guild_id()
std::optional< std::string > DiscordCPP::ApplicationCommand::get_guild_id |
( |
| ) |
|
|
inline |
- Returns
- The guild of the command.
◆ get_name()
std::string DiscordCPP::ApplicationCommand::get_name |
( |
| ) |
|
|
inline |
- Returns
- The command's name.
◆ get_options()
- Returns
- Parameters for the command, max of 25.
◆ get_type()
Type DiscordCPP::ApplicationCommand::get_type |
( |
| ) |
|
|
inline |
◆ get_version()
std::string DiscordCPP::ApplicationCommand::get_version |
( |
| ) |
|
|
inline |
- Returns
- Autoincrementing version identifier updated during substantial record changes.
◆ has_dm_permission()
bool DiscordCPP::ApplicationCommand::has_dm_permission |
( |
| ) |
|
|
inline |
- Returns
- Indicates wether the command is enabled in DMs. Defaults to true.
◆ set_description()
void DiscordCPP::ApplicationCommand::set_description |
( |
std::string | description | ) |
|
|
inline |
Set the command's description. Empty string for USER and MESSAGE commands.
◆ set_dm_permission()
void DiscordCPP::ApplicationCommand::set_dm_permission |
( |
bool | dm_permission | ) |
|
|
inline |
Set indicator wether the command is enabled in DMs.
◆ set_guild_id()
void DiscordCPP::ApplicationCommand::set_guild_id |
( |
std::string | guild_id | ) |
|
|
inline |
Set the guild of the command.
◆ set_name()
void DiscordCPP::ApplicationCommand::set_name |
( |
std::string | name | ) |
|
|
inline |
◆ set_type()
void DiscordCPP::ApplicationCommand::set_type |
( |
Type | type | ) |
|
|
inline |
◆ to_json()
json DiscordCPP::ApplicationCommand::to_json |
( |
| ) |
|
The documentation for this class was generated from the following files: