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

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

#include <FoundationEntities.hpp>

Inheritance diagram for discord_core_api::message_response_base:
[legend]

Public Member Functions

message_response_baseaddAllowedMentions (const allowed_mentions_data dataPackage)
 For setting the allowable mentions in a response. More...
 
message_response_baseaddButton (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...
 
message_response_baseaddComponentRow (const action_row_data dataPackage)
 For setting the components in a response. More...
 
message_response_baseaddContent (jsonifier::string_view dataPackage)
 For setting the message content in a response. More...
 
message_response_baseaddFile (file theFile)
 Adds a file to the current collection of files for this message response. More...
 
message_response_baseaddMessageEmbed (const embed_data dataPackage)
 For setting the embeds in a response. More...
 
message_response_baseaddModal (jsonifier::string_view topTitleNew, jsonifier::string_view topCustomIdNew, jsonifier::string_view titleNew, jsonifier::string_view customIdNew, bool required, uint64_t minLength, uint64_t maxLength, text_input_style inputStyle, jsonifier::string_view label="", jsonifier::string_view placeholder="")
 Adds a modal to the response message_data. More...
 
message_response_baseaddSelectMenu (bool disabled, jsonifier::string_view customIdNew, jsonifier::vector< select_option_data > options, jsonifier::string_view placeholder, uint64_t maxValues, uint64_t minValues, select_menu_type type, jsonifier::vector< channel_type > channelTypes=jsonifier::vector< channel_type >{})
 Adds a select-menu to the response message_data. More...
 
message_response_basesetTTSStatus (bool enabledTTs)
 For setting the tts status of a response. More...
 

Member Function Documentation

◆ addAllowedMentions()

message_response_base & discord_core_api::message_response_base::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 990 of file FoundationEntities.cpp.

◆ addButton()

message_response_base & discord_core_api::message_response_base::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
message_response_base& a reference to this data structure.

Definition at line 903 of file FoundationEntities.cpp.

◆ addComponentRow()

message_response_base & discord_core_api::message_response_base::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 995 of file FoundationEntities.cpp.

◆ addContent()

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

Definition at line 1005 of file FoundationEntities.cpp.

◆ addFile()

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

Definition at line 985 of file FoundationEntities.cpp.

◆ addMessageEmbed()

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

Definition at line 1000 of file FoundationEntities.cpp.

◆ addModal()

message_response_base & discord_core_api::message_response_base::addModal ( jsonifier::string_view  topTitleNew,
jsonifier::string_view  topCustomIdNew,
jsonifier::string_view  titleNew,
jsonifier::string_view  customIdNew,
bool  required,
uint64_t  minLength,
uint64_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
message_response_base& a reference to this data structure.

Definition at line 955 of file FoundationEntities.cpp.

◆ addSelectMenu()

message_response_base & discord_core_api::message_response_base::addSelectMenu ( bool  disabled,
jsonifier::string_view  customIdNew,
jsonifier::vector< select_option_data options,
jsonifier::string_view  placeholder,
uint64_t  maxValues,
uint64_t  minValues,
select_menu_type  type,
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 929 of file FoundationEntities.cpp.

◆ setTTSStatus()

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

Definition at line 1010 of file FoundationEntities.cpp.


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