#include <dpp/export.h>
#include <dpp/snowflake.h>
#include <dpp/managed.h>
#include <dpp/message.h>
#include <dpp/channel.h>
#include <dpp/role.h>
#include <dpp/user.h>
#include <dpp/entitlement.h>
#include <variant>
#include <map>
#include <dpp/json_fwd.h>
#include <dpp/json_interface.h>
Classes | |
struct | dpp::autocomplete_interaction |
An auto complete interaction. More... | |
struct | dpp::command_data_option |
Values in the command interaction. More... | |
struct | dpp::command_interaction |
Details of a command within an interaction. More... | |
struct | dpp::command_option |
Each command option is a command line parameter. More... | |
struct | dpp::command_option_choice |
This struct represents choices in a multiple choice option for a command parameter. More... | |
class | dpp::command_permission |
Application command permissions allow you to enable or disable commands for specific users or roles within a guild. More... | |
struct | dpp::command_resolved |
Resolved snowflake ids to users, guild members, roles and channels. More... | |
struct | dpp::component_interaction |
A button click for a button component. More... | |
class | dpp::guild_command_permissions |
Returned when fetching the permissions for a command in a guild. More... | |
class | dpp::interaction |
An interaction represents a user running a command and arrives via the dpp::cluster::on_interaction_create event. More... | |
struct | dpp::interaction_modal_response |
Represents a modal dialog box response to an interaction. More... | |
struct | dpp::interaction_response |
A response to an interaction, used to reply to a command and initiate a message, which can be hidden from others (ephemeral) or visible to all. More... | |
class | dpp::slashcommand |
Represents an application command, created by your bot either globally, or on a guild. More... | |
Namespaces | |
dpp | |
The main namespace for D++ functions. | |
Macros | |
#define | AUTOCOMPLETE_MAX_CHOICES 25 |
Discord limits the maximum number of replies to an autocomplete interaction to 25. More... | |
Typedefs | |
typedef std::variant< std::monostate, int64_t, double > | dpp::command_option_range |
A minimum or maximum value/length for dpp::co_number, dpp::co_integer and dpp::co_string types of a dpp::command_option. More... | |
typedef std::variant< std::monostate, std::string, int64_t, bool, snowflake, double > | dpp::command_value |
This type is a variant that can hold any of the potential native data types represented by the enum dpp::command_option_type. More... | |
typedef std::unordered_map< snowflake, guild_command_permissions > | dpp::guild_command_permissions_map |
A group of guild command permissions. More... | |
typedef std::unordered_map< snowflake, slashcommand > | dpp::slashcommand_map |
A group of application slash commands. More... | |
Functions | |
void | dpp::from_json (const nlohmann::json &j, autocomplete_interaction &ai) |
helper function to deserialize an autocomplete_interaction from json More... | |
void | dpp::from_json (const nlohmann::json &j, command_data_option &cdo) |
helper function to deserialize a command_data_option from json More... | |
void | dpp::from_json (const nlohmann::json &j, command_interaction &ci) |
helper function to deserialize a command_interaction from json More... | |
void | dpp::from_json (const nlohmann::json &j, component_interaction &bi) |
helper function to deserialize a component_interaction from json More... | |
void | dpp::from_json (const nlohmann::json &j, interaction &i) |
helper function to deserialize an interaction from json More... | |
void | dpp::to_json (nlohmann::json &j, const command_option &opt) |
helper function to serialize a command_option to json More... | |
void | dpp::to_json (nlohmann::json &j, const command_option_choice &choice) |
helper function to serialize a command_option_choice to json More... | |
void | dpp::to_json (nlohmann::json &j, const command_permission &cp) |
helper function to serialize a command_permission to json More... | |
void | dpp::to_json (nlohmann::json &j, const guild_command_permissions &gcp) |
helper function to serialize a guild_command_permissions to json More... | |
void | dpp::to_json (nlohmann::json &j, const slashcommand &cmd) |
helper function to serialize a slashcommand to json More... | |
#define AUTOCOMPLETE_MAX_CHOICES 25 |
Discord limits the maximum number of replies to an autocomplete interaction to 25.
This value represents that maximum. interaction_response::add_autocomplete_choice does not allow adding more than this number of elements to the vector.