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

Message response base, for responding to messages. More...

#include <FoundationEntities.hpp>

Inheritance diagram for DiscordCoreAPI::MessageResponseBase:
[legend]

Public Member Functions

MessageResponseBaseaddAllowedMentions (AllowedMentionsData dataPackage)
 For setting the allowable mentions in a response.
 
MessageResponseBaseaddButton (bool disabled, const std::string &customIdNew, const std::string &buttonLabel, ButtonStyle buttonStyle, const std::string &emojiName="", Snowflake emojiId=Snowflake{ 0 }, const std::string &url="")
 Adds a button to the response Message.
 
MessageResponseBaseaddComponentRow (ActionRowData dataPackage)
 For setting the components in a response.
 
MessageResponseBaseaddContent (const std::string &dataPackage)
 For setting the Message content in a response.
 
MessageResponseBaseaddFile (File theFile)
 Adds a file to the current collection of files for this message response.
 
MessageResponseBaseaddMessageEmbed (EmbedData dataPackage)
 For setting the embeds in a response.
 
MessageResponseBaseaddModal (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.
 
MessageResponseBaseaddSelectMenu (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.
 
MessageResponseBasesetTTSStatus (bool enabledTTs)
 For setting the tts status of a response.
 

Member Function Documentation

◆ addAllowedMentions()

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

Definition at line 3858 of file FoundationEntities.cpp.

◆ addButton()

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

Definition at line 3771 of file FoundationEntities.cpp.

◆ addComponentRow()

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

Definition at line 3863 of file FoundationEntities.cpp.

◆ addContent()

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

Definition at line 3873 of file FoundationEntities.cpp.

◆ addFile()

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

Definition at line 3853 of file FoundationEntities.cpp.

◆ addMessageEmbed()

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

Definition at line 3868 of file FoundationEntities.cpp.

◆ addModal()

MessageResponseBase & DiscordCoreAPI::MessageResponseBase::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
MessageResponseBase& A reference to this data structure.

Definition at line 3823 of file FoundationEntities.cpp.

◆ addSelectMenu()

MessageResponseBase & DiscordCoreAPI::MessageResponseBase::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 3797 of file FoundationEntities.cpp.

◆ setTTSStatus()

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

Definition at line 3878 of file FoundationEntities.cpp.


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