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

For executing a WebHook. More...

#include <WebHookEntities.hpp>

Inheritance diagram for DiscordCoreAPI::ExecuteWebHookData:
[legend]

Public Member Functions

ExecuteWebHookDataaddAllowedMentions (AllowedMentionsData dataPackage)
 For setting the allowable mentions in a response. More...
 
ExecuteWebHookDataaddButton (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. More...
 
ExecuteWebHookDataaddComponentRow (ActionRowData dataPackage)
 For setting the components in a response. More...
 
ExecuteWebHookDataaddContent (const std::string &dataPackage)
 For setting the content in a response. More...
 
ExecuteWebHookDataaddFile (File theFile)
 Adds a file to the current collection of files for this message response. More...
 
ExecuteWebHookDataaddMessageEmbed (EmbedData dataPackage)
 For setting the embeds in a response. More...
 
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. More...
 
ExecuteWebHookData addSelectMenu (bool disabled, const std::string &customIdNew, std::vector< SelectOptionData > options, const std::string &placeholder, int32_t maxValues, int32_t minValues)
 Adds a select-menu to the response Message. More...
 
ExecuteWebHookDatasetTTSStatus (bool enabledTTs)
 For setting the tts status of a response. More...
 

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 { false }
 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)

For setting the allowable mentions in a response.

Parameters
dataPackageAn AllowedMentionsData structure.

Definition at line 209 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{ 0 },
const std::string &  url = "" 
)

Adds a button to the response Message.

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.

Definition at line 124 of file WebHookEntities.cpp.

◆ addComponentRow()

ExecuteWebHookData & DiscordCoreAPI::ExecuteWebHookData::addComponentRow ( ActionRowData  dataPackage)

For setting the components in a response.

Parameters
dataPackageAn ActionRowData structure.

Definition at line 214 of file WebHookEntities.cpp.

◆ addContent()

ExecuteWebHookData & DiscordCoreAPI::ExecuteWebHookData::addContent ( const std::string &  dataPackage)

For setting the Message content in a response.

Parameters
dataPackageA string, containing the content.

Definition at line 224 of file WebHookEntities.cpp.

◆ addFile()

ExecuteWebHookData & DiscordCoreAPI::ExecuteWebHookData::addFile ( File  theFile)

Adds a file to the current collection of files for this message response.

Parameters
theFileThe file to be added.
Returns
MessageResponseBase& A reference to this data structure.

Definition at line 204 of file WebHookEntities.cpp.

◆ addMessageEmbed()

ExecuteWebHookData & DiscordCoreAPI::ExecuteWebHookData::addMessageEmbed ( EmbedData  dataPackage)

For setting the embeds in a response.

Parameters
dataPackageAn EmbedData structure.

Definition at line 219 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 = "" 
)

Adds a modal to the response Message.

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 175 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 
)

Adds a select-menu to the response Message.

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.

Definition at line 150 of file WebHookEntities.cpp.

◆ setTTSStatus()

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

For setting the tts status of a response.

Parameters
enabledTTsA bool.

Definition at line 229 of file WebHookEntities.cpp.


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