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

For executing a WebHook. More...

#include <WebHookEntities.hpp>

Inheritance diagram for DiscordCoreAPI::ExecuteWebHookData:

Public Member Functions

ExecuteWebHookDataaddAllowedMentions (AllowedMentionsData dataPackage)
 For setting the allowable mentions in a response.
ExecuteWebHookDataaddButton (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.
ExecuteWebHookDataaddComponentRow (ActionRowData dataPackage)
 For setting the components in a response.
ExecuteWebHookDataaddContent (const std::string &dataPackage)
 For setting the content in a response.
ExecuteWebHookDataaddFile (File theFile)
 Adds a file to the current collection of files for this message response.
ExecuteWebHookDataaddMessageEmbed (EmbedData dataPackage)
 For setting the embeds in a response.
ExecuteWebHookDataaddModal (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.
ExecuteWebHookDataaddSelectMenu (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.
ExecuteWebHookDatasetTTSStatus (bool enabledTTs)
 For setting the tts status of a response.

Public Data Members

Snowflake threadId {}
 Send a message to the specified thread within a webhook's Channel. The thread will automatically be unarchived.
bool wait {}
 Waits for server confirmation of message send before response, and returns the created message body.

Member Function Documentation

◆ addAllowedMentions()

ExecuteWebHookData & DiscordCoreAPI::ExecuteWebHookData::addAllowedMentions ( AllowedMentionsData  dataPackage)
dataPackageAn AllowedMentionsData structure.

Definition at line 208 of file WebHookEntities.cpp.

◆ addButton()

ExecuteWebHookData & DiscordCoreAPI::ExecuteWebHookData::addButton ( bool  disabled,
const std::string &  customIdNew,
const std::string &  buttonLabel,
ButtonStyle  buttonStyle,
const std::string &  emojiName = "",
Snowflake  emojiId = Snowflake{},
const std::string &  url = "" 
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.

Definition at line 120 of file WebHookEntities.cpp.

◆ addComponentRow()

ExecuteWebHookData & DiscordCoreAPI::ExecuteWebHookData::addComponentRow ( ActionRowData  dataPackage)
dataPackageAn ActionRowData structure.

Definition at line 213 of file WebHookEntities.cpp.

◆ addContent()

ExecuteWebHookData & DiscordCoreAPI::ExecuteWebHookData::addContent ( const std::string &  dataPackage)
dataPackageA string, containing the content.

Definition at line 223 of file WebHookEntities.cpp.

◆ addFile()

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

Definition at line 203 of file WebHookEntities.cpp.

◆ addMessageEmbed()

ExecuteWebHookData & DiscordCoreAPI::ExecuteWebHookData::addMessageEmbed ( EmbedData  dataPackage)
dataPackageAn EmbedData structure.

Definition at line 218 of file WebHookEntities.cpp.

◆ addModal()

ExecuteWebHookData & DiscordCoreAPI::ExecuteWebHookData::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 = "" 
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.
RespondToInputEventData& A reference to this data structure.

Definition at line 173 of file WebHookEntities.cpp.

◆ addSelectMenu()

ExecuteWebHookData & DiscordCoreAPI::ExecuteWebHookData::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>{} 
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.
RespondToInputEventData& A reference to this data structure.

Definition at line 146 of file WebHookEntities.cpp.

◆ setTTSStatus()

ExecuteWebHookData & DiscordCoreAPI::ExecuteWebHookData::setTTSStatus ( bool  enabledTTs)
enabledTTsA bool.

Definition at line 228 of file WebHookEntities.cpp.

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