43 using auto_complete_entry_function = std::function<jsonifier::string(jsonifier::string)>;
45 class DiscordCoreAPI_Dll interaction_response_base {
47 template<
typename value_type>
friend struct jsonifier::core;
49 unordered_set<jsonifier::string> excludedKeys{};
59 interaction_response_base& addButton(
bool disabled, jsonifier::string_view customIdNew, jsonifier::string_view buttonLabel, button_style buttonStyle,
60 jsonifier::string_view emojiName =
"", snowflake emojiId = snowflake{}, jsonifier::string_view url =
"");
69 interaction_response_base& addSelectMenu(
bool disabled, jsonifier::string_view customIdNew, jsonifier::vector<select_option_data> options,
70 jsonifier::string_view placeholder, uint64_t maxValues, uint64_t minValues, select_menu_type type,
71 jsonifier::vector<channel_type> channelTypes = jsonifier::vector<channel_type>{});
85 interaction_response_base& addModal(jsonifier::string_view topTitleNew, jsonifier::string_view topCustomIdNew, jsonifier::string_view titleNew,
86 jsonifier::string_view customIdNew,
bool required, uint64_t minLength, uint64_t maxLength, text_input_style inputStyle, jsonifier::string_view label =
"",
87 jsonifier::string_view placeholder =
"");
92 interaction_response_base& addFile(
const file& theFile);
96 interaction_response_base& addAllowedMentions(
const allowed_mentions_data dataPackage);
100 interaction_response_base& addComponentRow(
const action_row_data dataPackage);
104 interaction_response_base& setResponseType(interaction_callback_type type);
108 interaction_response_base& addMessageEmbed(
const embed_data dataPackage);
112 interaction_response_base& addContent(jsonifier::string_view dataPackage);
116 interaction_response_base& setTTSStatus(
bool enabledTTs);
118 interaction_response_base& setFlags(uint64_t flag);
120 interaction_response_data getInteractionResponseData();
122 void generateExcludedKeys();
124 virtual ~interaction_response_base() =
default;
127 interaction_package_data interactionPackage{};
128 message_package_data messagePackage{};
129 interaction_callback_data data{};
160 template<
typename value_type>
friend struct jsonifier::core;
189 template<
typename value_type>
friend struct jsonifier::core;
210 uint32_t timeDelay{};
231 template<
typename value_type>
friend struct jsonifier::core;
257 template<
typename value_type>
friend struct jsonifier::core;
280 uint32_t timeDelay{};
293 friend class discord_core_internal::base_socket_agent;
368 if (
this != &other) {
384 if (
this != &other) {
402 jsonifier::vector<jsonifier::string>
values{};
416 static unordered_map<jsonifier::string, unbounded_message_block<interaction_data>*> selectMenuInteractionBuffersMap;
443 jsonifier::vector<select_menu_response_data> responseVector{};
445 jsonifier::vector<jsonifier::string> values{};
446 uint32_t currentCollectedSelectMenuCount{};
447 uint32_t maxCollectedSelectMenuCount{};
448 jsonifier::string buffersMapKey{};
449 jsonifier::string selectMenuId{};
450 bool getSelectMenuDataForAll{};
451 uint32_t maxTimeInMs{};
467 if (
this != &other) {
483 if (
this != &other) {
513 static unordered_map<jsonifier::string, unbounded_message_block<interaction_data>*> buttonInteractionBuffersMap;
540 jsonifier::vector<button_response_data> responseVector{};
542 jsonifier::vector<jsonifier::string> values{};
543 uint32_t currentCollectedButtonCount{};
544 uint32_t maxCollectedButtonCount{};
545 jsonifier::string buffersMapKey{};
546 bool getButtonDataForAll{};
547 uint32_t maxTimeInMs{};
548 jsonifier::string buttonId{};
564 if (
this != &other) {
570 values = other.values;
582 jsonifier::vector<jsonifier::string> values{};
594 static unordered_map<jsonifier::string, unbounded_message_block<interaction_data>*> modalInteractionBuffersMap;
616 uint32_t currentCollectedButtonCount{};
618 uint32_t maxTimeInMs{};
A co_routine - representing a potentially asynchronous operation/function.
For creating a deferred interaction response.
For creating an ephemeral follow up message_data.
For creating an ephemeral interaction response.
For creating a follow up message_data.
For creating an interaction response.
discord_core_client - the main class for this library.
For sending Https requests.
Event-delegate, for representing an event-function to be executed conditionally.
A trigger event that fires based on the result of trigger-function return value.
For editing a follow up message_data.
For editing an interaction response.
For editing a web_hook message_data.
Class for handling the assignment of event-handling functions.int32_t.
For executing a web_hook.
An interface class for the interaction_data related discord endpoints.
Data structure representing a single message_data.
Modal_collector, for collecting modal text input from one or more users.
A class representing a snowflake identifier with various operations.
A thread-safe messaging block for data-structures.
A smart pointer class that provides unique ownership semantics.
interaction_callback_type
Interaction callback types.
The main namespace for the forward-facing interfaces.
For deleting a follow up message_data.
For deleting an interaction response.
For getting a follow-up message_data.
jsonifier::string interactionToken
Interaction token.
snowflake applicationId
Application id.
snowflake messageId
Message id.
For getting an interaction response.
jsonifier::string interactionToken
Interaction token.
snowflake applicationId
Application id.
For storing interaction-related values.
For storing message_data-related values.
snowflake userId
The user_data id who selected the menu options.
snowflake channelId
The channel_data id where it took place.
jsonifier::string customIdSmall
the input values of the modal component.
jsonifier::string customId
The customId of the modal component.
unique_ptr< interaction_data > interactionData
Interaction data.