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

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

#include <FoundationEntities.hpp>

Public Member Functions

RespondToInputEventDataaddAllowedMentions (AllowedMentionsData dataPackage)
 For setting the allowable mentions in a response.
 
RespondToInputEventDataaddButton (bool disabled, const std::string &customIdNew, const std::string &buttonLabel, ButtonStyle buttonStyle, const std::string &emojiName="", Snowflake emojiId=Snowflake{}, const std::string &url="")
 Adds a button to the response Message.
 
RespondToInputEventDataaddComponentRow (ActionRowData dataPackage)
 For setting the components in a response.
 
RespondToInputEventDataaddContent (const std::string &dataPackage)
 For setting the Message content in a response.
 
RespondToInputEventDataaddFile (File theFile)
 Adds a file to the current collection of files for this message response.
 
RespondToInputEventDataaddMessageEmbed (EmbedData dataPackage)
 For setting the embeds in a response.
 
RespondToInputEventDataaddModal (const std::string &topTitleNew, const std::string &topCustomIdNew, const std::string &titleNew, const std::string &customIdNew, bool required, int32_t minLength, int32_t maxLength, TextInputStyle inputStyle, const std::string &label="", const std::string &placeholder="")
 Adds a modal to the response Message.
 
RespondToInputEventDataaddSelectMenu (bool disabled, const std::string &customIdNew, std::vector< SelectOptionData > options, const std::string &placeholder, int32_t maxValues, int32_t minValues, SelectMenuType type, std::vector< ChannelType > channelTypes=std::vector< ChannelType >{})
 Adds a select-menu to the response Message.
 
RespondToInputEventDatasetAutoCompleteChoice (Serializer value, const std::string &theName, std::unordered_map< std::string, std::string > theNameLocalizations)
 For setting the choices of an autocomplete response.
 
RespondToInputEventDatasetResponseType (InputEventResponseType typeNew)
 For setting the type of response to make.
 
RespondToInputEventDatasetTargetUserID (const Snowflake targetUserIdNew)
 For setting the direct-Message User target of a response.
 
RespondToInputEventDatasetTTSStatus (bool enabledTTs)
 For setting the tts status of a response.
 

Member Function Documentation

◆ addAllowedMentions()

RespondToInputEventData & DiscordCoreAPI::RespondToInputEventData::addAllowedMentions ( AllowedMentionsData  dataPackage)
Parameters
dataPackageAn AllowedMentionsData structure.
Returns
RespondToInputEventData& A reference to this data structure.

Definition at line 3707 of file FoundationEntities.cpp.

◆ addButton()

RespondToInputEventData & DiscordCoreAPI::RespondToInputEventData::addButton ( bool  disabled,
const std::string &  customIdNew,
const std::string &  buttonLabel,
ButtonStyle  buttonStyle,
const std::string &  emojiName = "",
Snowflake  emojiId = Snowflake{},
const std::string &  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
RespondToInputEventData& A reference to this data structure.

Definition at line 3619 of file FoundationEntities.cpp.

◆ addComponentRow()

RespondToInputEventData & DiscordCoreAPI::RespondToInputEventData::addComponentRow ( ActionRowData  dataPackage)
Parameters
dataPackageAn ActionRowData structure.
Returns
RespondToInputEventData& A reference to this data structure.

Definition at line 3717 of file FoundationEntities.cpp.

◆ addContent()

RespondToInputEventData & DiscordCoreAPI::RespondToInputEventData::addContent ( const std::string &  dataPackage)
Parameters
dataPackageA string, containing the content.
Returns
RespondToInputEventData& A reference to this data structure.

Definition at line 3727 of file FoundationEntities.cpp.

◆ addFile()

RespondToInputEventData & DiscordCoreAPI::RespondToInputEventData::addFile ( File  theFile)
Parameters
theFileThe file to be added.
Returns
RespondToInputEventData& A reference to this data structure.

Definition at line 3702 of file FoundationEntities.cpp.

◆ addMessageEmbed()

RespondToInputEventData & DiscordCoreAPI::RespondToInputEventData::addMessageEmbed ( EmbedData  dataPackage)
Parameters
dataPackageAn EmbedData structure.
Returns
RespondToInputEventData& A reference to this data structure.

Definition at line 3722 of file FoundationEntities.cpp.

◆ addModal()

RespondToInputEventData & DiscordCoreAPI::RespondToInputEventData::addModal ( const std::string &  topTitleNew,
const std::string &  topCustomIdNew,
const std::string &  titleNew,
const std::string &  customIdNew,
bool  required,
int32_t  minLength,
int32_t  maxLength,
TextInputStyle  inputStyle,
const std::string &  label = "",
const std::string &  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
RespondToInputEventData& A reference to this data structure.

Definition at line 3672 of file FoundationEntities.cpp.

◆ addSelectMenu()

RespondToInputEventData & DiscordCoreAPI::RespondToInputEventData::addSelectMenu ( bool  disabled,
const std::string &  customIdNew,
std::vector< SelectOptionData options,
const std::string &  placeholder,
int32_t  maxValues,
int32_t  minValues,
SelectMenuType  type,
std::vector< ChannelType channelTypes = std::vector<ChannelType>{} 
)
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 ChannelType.
Returns
RespondToInputEventData& A reference to this data structure.

Definition at line 3645 of file FoundationEntities.cpp.

◆ setAutoCompleteChoice()

RespondToInputEventData & DiscordCoreAPI::RespondToInputEventData::setAutoCompleteChoice ( Serializer  value,
const std::string &  theName,
std::unordered_map< std::string, std::string >  theNameLocalizations 
)
Parameters
valueAn Object value that is either a double, int32_t or a string.
theNameA string for the name of the choice.
theNameLocalizationsA std::unordered_map<std::string, std::string> for the name localizations.
Returns
RespondToInputEventData& A reference to this data structure.

Definition at line 3737 of file FoundationEntities.cpp.

◆ setResponseType()

RespondToInputEventData & DiscordCoreAPI::RespondToInputEventData::setResponseType ( InputEventResponseType  typeNew)
Parameters
typeNewAn InputEventResponseType.
Returns
RespondToInputEventData& A reference to this data structure.

Definition at line 3712 of file FoundationEntities.cpp.

◆ setTargetUserID()

RespondToInputEventData & DiscordCoreAPI::RespondToInputEventData::setTargetUserID ( const Snowflake  targetUserIdNew)
Parameters
targetUserIdNewA string, containing the target User's id.
Returns
RespondToInputEventData& A reference to this data structure.

Definition at line 3770 of file FoundationEntities.cpp.

◆ setTTSStatus()

RespondToInputEventData & DiscordCoreAPI::RespondToInputEventData::setTTSStatus ( bool  enabledTTs)
Parameters
enabledTTsA bool.
Returns
RespondToInputEventData& A reference to this data structure.

Definition at line 3732 of file FoundationEntities.cpp.


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