DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
Loading...
Searching...
No Matches
discord_core_api::respond_to_input_event_data Class Reference

Data for responding to an input-event. More...

#include <FoundationEntities.hpp>

Public Member Functions

respond_to_input_event_dataaddAllowedMentions (const allowed_mentions_data dataPackage)
 For setting the allowable mentions in a response. More...
 
respond_to_input_event_dataaddButton (bool disabled, jsonifier::string_view customIdNew, jsonifier::string_view buttonLabel, button_style buttonStyle, jsonifier::string_view emojiName="", snowflake emojiId=snowflake{}, jsonifier::string_view url="")
 Adds a button to the response message_data. More...
 
respond_to_input_event_dataaddComponentRow (const action_row_data dataPackage)
 For setting the components in a response. More...
 
respond_to_input_event_dataaddContent (jsonifier::string_view dataPackage)
 For setting the message content in a response. More...
 
respond_to_input_event_dataaddFile (const file &theFile)
 Adds a file to the current collection of files for this message response. More...
 
respond_to_input_event_dataaddMessageEmbed (const embed_data dataPackage)
 For setting the embeds in a response. More...
 
respond_to_input_event_dataaddModal (jsonifier::string_view topTitleNew, jsonifier::string_view topCustomIdNew, jsonifier::string_view titleNew, jsonifier::string_view customIdNew, bool required, uint64_t minLength, uint64_t maxLength, text_input_style inputStyle, jsonifier::string_view label="", jsonifier::string_view placeholder="")
 Adds a modal to the response message_data. More...
 
respond_to_input_event_dataaddSelectMenu (bool disabled, jsonifier::string_view customIdNew, const jsonifier::vector< select_option_data > &options, jsonifier::string_view placeholder, uint64_t maxValues, uint64_t minValues, select_menu_type type, jsonifier::vector< channel_type > channelTypes=jsonifier::vector< channel_type >{})
 Adds a select-menu to the response message_data. More...
 
respond_to_input_event_datasetAutoCompleteChoice (discord_core_internal::etf_serializer value, jsonifier::string_view theName, unordered_map< jsonifier::string, jsonifier::string > theNameLocalizations)
 For setting the choices of an autocomplete response. More...
 
respond_to_input_event_datasetResponseType (input_event_response_type typeNew)
 For setting the type of response to make. More...
 
respond_to_input_event_datasetTargetUserID (const snowflake targetUserIdNew)
 For setting the direct-message_data user target of a response. More...
 
respond_to_input_event_datasetTTSStatus (bool enabledTTs)
 For setting the tts status of a response. More...
 

Member Function Documentation

◆ addAllowedMentions()

respond_to_input_event_data & discord_core_api::respond_to_input_event_data::addAllowedMentions ( const allowed_mentions_data  dataPackage)
Parameters
dataPackagean allowed_mentions_data structure.
Returns
respond_to_input_event_data& a reference to this data structure.

Definition at line 858 of file FoundationEntities.cpp.

◆ addButton()

respond_to_input_event_data & discord_core_api::respond_to_input_event_data::addButton ( bool  disabled,
jsonifier::string_view  customIdNew,
jsonifier::string_view  buttonLabel,
button_style  buttonStyle,
jsonifier::string_view  emojiName = "",
snowflake  emojiId = snowflake{},
jsonifier::string_view  url = "" 
)
Parameters
disabledwhether the button is active or not.
customIdNewa custom id to give for identifying the button.
buttonLabela visible label for the button.
buttonStylethe style of the button.
emojiNamean emoji name, if desired.
emojiIdan emoji id, if desired.
urla url, if applicable.
Returns
respond_to_input_event_data& a reference to this data structure.

Definition at line 771 of file FoundationEntities.cpp.

◆ addComponentRow()

respond_to_input_event_data & discord_core_api::respond_to_input_event_data::addComponentRow ( const action_row_data  dataPackage)
Parameters
dataPackagean action_row_data structure.
Returns
respond_to_input_event_data& a reference to this data structure.

Definition at line 868 of file FoundationEntities.cpp.

◆ addContent()

respond_to_input_event_data & discord_core_api::respond_to_input_event_data::addContent ( jsonifier::string_view  dataPackage)
Parameters
dataPackagea string, containing the content.
Returns
respond_to_input_event_data& a reference to this data structure.

Definition at line 878 of file FoundationEntities.cpp.

◆ addFile()

respond_to_input_event_data & discord_core_api::respond_to_input_event_data::addFile ( const file theFile)
Parameters
theFilethe file to be added.
Returns
respond_to_input_event_data& a reference to this data structure.

Definition at line 853 of file FoundationEntities.cpp.

◆ addMessageEmbed()

respond_to_input_event_data & discord_core_api::respond_to_input_event_data::addMessageEmbed ( const embed_data  dataPackage)
Parameters
dataPackagean embed_data structure.
Returns
respond_to_input_event_data& a reference to this data structure.

Definition at line 873 of file FoundationEntities.cpp.

◆ addModal()

respond_to_input_event_data & discord_core_api::respond_to_input_event_data::addModal ( jsonifier::string_view  topTitleNew,
jsonifier::string_view  topCustomIdNew,
jsonifier::string_view  titleNew,
jsonifier::string_view  customIdNew,
bool  required,
uint64_t  minLength,
uint64_t  maxLength,
text_input_style  inputStyle,
jsonifier::string_view  label = "",
jsonifier::string_view  placeholder = "" 
)
Parameters
topTitleNewa title for the modal.
topCustomIdNewa custom id to give for the modal.
titleNewa title for the modal's individual input.
customIdNewa custom id to give for the modal's individual input.
requiredis it a required response?
minLengthminimum length.
maxLengthmaximum length.
inputStylethe input style.
labela label for the modal.
placeholdera placeholder for the modal.
Returns
respond_to_input_event_data& a reference to this data structure.

Definition at line 823 of file FoundationEntities.cpp.

◆ addSelectMenu()

respond_to_input_event_data & discord_core_api::respond_to_input_event_data::addSelectMenu ( bool  disabled,
jsonifier::string_view  customIdNew,
const jsonifier::vector< select_option_data > &  options,
jsonifier::string_view  placeholder,
uint64_t  maxValues,
uint64_t  minValues,
select_menu_type  type,
jsonifier::vector< channel_type channelTypes = jsonifier::vector<channel_type>{} 
)
Parameters
disabledwhether the select-menu is active or not.
customIdNewa custom id to give for identifying the select-menu.
optionsa vector of select-menu-options to offer.
placeholdercustom placeholder text if nothing is selected, max 100 characters.
maxValuesmaximum number of selections that are possible.
minValuesminimum required number of selections that are required.
typethe type of select-menu that this is.
channelTypestypes of channels that can be accepted if this is of the type channel_type.
Returns
respond_to_input_event_data& a reference to this data structure.

Definition at line 797 of file FoundationEntities.cpp.

◆ setAutoCompleteChoice()

respond_to_input_event_data & discord_core_api::respond_to_input_event_data::setAutoCompleteChoice ( discord_core_internal::etf_serializer  value,
jsonifier::string_view  theName,
unordered_map< jsonifier::string, jsonifier::string >  theNameLocalizations 
)
Parameters
valuean simdjson::ondemand::object value that is either a double, uint64_t or a string.
theNamea string for the name of the choice.
theNameLocalizationsa unordered_map<jsonifier::string, jsonifier::string> for the name localizations.
Returns
respond_to_input_event_data& a reference to this data structure.

Definition at line 888 of file FoundationEntities.cpp.

◆ setResponseType()

respond_to_input_event_data & discord_core_api::respond_to_input_event_data::setResponseType ( input_event_response_type  typeNew)
Parameters
typeNewan input_event_response_type.
Returns
respond_to_input_event_data& a reference to this data structure.

Definition at line 863 of file FoundationEntities.cpp.

◆ setTargetUserID()

respond_to_input_event_data & discord_core_api::respond_to_input_event_data::setTargetUserID ( const snowflake  targetUserIdNew)
Parameters
targetUserIdNewa string, containing the target user_data's id.
Returns
respond_to_input_event_data& a reference to this data structure.

Definition at line 898 of file FoundationEntities.cpp.

◆ setTTSStatus()

respond_to_input_event_data & discord_core_api::respond_to_input_event_data::setTTSStatus ( bool  enabledTTs)
Parameters
enabledTTsa bool.
Returns
respond_to_input_event_data& a reference to this data structure.

Definition at line 883 of file FoundationEntities.cpp.


The documentation for this class was generated from the following files: