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

For executing a web_hook. More...

#include <WebHookEntities.hpp>

Inheritance diagram for discord_core_api::execute_web_hook_data:
[legend]

Public Member Functions

execute_web_hook_dataaddAllowedMentions (const allowed_mentions_data dataPackage)
 For setting the allowable mentions in a response. More...
 
execute_web_hook_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...
 
execute_web_hook_dataaddComponentRow (const action_row_data dataPackage)
 For setting the components in a response. More...
 
execute_web_hook_dataaddContent (jsonifier::string_view dataPackage)
 For setting the content in a response. More...
 
execute_web_hook_dataaddFile (const file &theFile)
 Adds a file to the current collection of files for this message response. More...
 
execute_web_hook_dataaddMessageEmbed (const embed_data dataPackage)
 For setting the embeds in a response. More...
 
execute_web_hook_dataaddModal (jsonifier::string_view topTitleNew, jsonifier::string_view topCustomIdNew, jsonifier::string_view titleNew, jsonifier::string_view customIdNew, bool required, int32_t minLength, int32_t maxLength, text_input_style inputStyle, jsonifier::string_view label="", jsonifier::string_view placeholder="")
 Adds a modal to the response message_data. More...
 
execute_web_hook_dataaddSelectMenu (bool disabled, jsonifier::string_view customIdNew, const jsonifier::vector< select_option_data > &options, jsonifier::string_view placeholder, int32_t maxValues, int32_t minValues, select_menu_type type, const jsonifier::vector< channel_type > &channelTypes=jsonifier::vector< channel_type >{})
 Adds a select-menu to the response message_data. More...
 
execute_web_hook_datasetTTSStatus (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_data. 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()

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

Definition at line 168 of file WebHookEntities.cpp.

◆ addButton()

execute_web_hook_data & discord_core_api::execute_web_hook_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 81 of file WebHookEntities.cpp.

◆ addComponentRow()

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

Definition at line 173 of file WebHookEntities.cpp.

◆ addContent()

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

Definition at line 183 of file WebHookEntities.cpp.

◆ addFile()

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

Definition at line 163 of file WebHookEntities.cpp.

◆ addMessageEmbed()

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

Definition at line 178 of file WebHookEntities.cpp.

◆ addModal()

execute_web_hook_data & discord_core_api::execute_web_hook_data::addModal ( jsonifier::string_view  topTitleNew,
jsonifier::string_view  topCustomIdNew,
jsonifier::string_view  titleNew,
jsonifier::string_view  customIdNew,
bool  required,
int32_t  minLength,
int32_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 133 of file WebHookEntities.cpp.

◆ addSelectMenu()

execute_web_hook_data & discord_core_api::execute_web_hook_data::addSelectMenu ( bool  disabled,
jsonifier::string_view  customIdNew,
const jsonifier::vector< select_option_data > &  options,
jsonifier::string_view  placeholder,
int32_t  maxValues,
int32_t  minValues,
select_menu_type  type,
const 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 107 of file WebHookEntities.cpp.

◆ setTTSStatus()

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

Definition at line 188 of file WebHookEntities.cpp.


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