A response to an interaction, used to reply to a command and initiate a message, which can be hidden from others (ephemeral) or visible to all.
More...
#include "appcommand.h"
A response to an interaction, used to reply to a command and initiate a message, which can be hidden from others (ephemeral) or visible to all.
The dpp::interaction_response object wraps a dpp::message object. To set the message as 'ephemeral' (e.g. only the command issuer can see it) you should add the dpp::m_ephemeral flag to the dpp::message::flags field. e.g.:
mymessage.flags |= dpp::m_ephemeral;
◆ interaction_response() [1/4]
dpp::interaction_response::interaction_response |
( |
| ) |
|
|
default |
Construct a new interaction response object.
◆ interaction_response() [2/4]
◆ interaction_response() [3/4]
Construct a new interaction response object.
- Parameters
-
t | Type of reply |
m | Message to reply with |
◆ interaction_response() [4/4]
Construct a new interaction response object.
- Parameters
-
t | Type of reply |
m | Message to reply with |
◆ ~interaction_response()
virtual dpp::interaction_response::~interaction_response |
( |
| ) |
|
|
virtualdefault |
Destroy the interaction response object.
◆ add_autocomplete_choice()
Add a command option choice.
- Parameters
-
achoice | command option choice to add |
- Returns
- interaction_response& Reference to self
◆ build_json()
Convert object to json string.
- Parameters
-
with_id | Whether to include the ID or not |
- Note
- Some fields are conditionally filled, do not rely on all fields being present
- Returns
- std::string Json built from the structure
◆ fill_from_json()
Convert object from nlohmann::json.
- Parameters
-
- Returns
- T& Reference to self for fluent calling
◆ fill_from_json_impl()
◆ to_json()
Convert object to nlohmann::json.
- Parameters
-
with_id | Whether to include the ID or not |
- Note
- Some fields are conditionally filled, do not rely on all fields being present
- Returns
- json Json built from the structure
◆ to_json_impl()
json dpp::interaction_response::to_json_impl |
( |
bool |
with_id = false | ) |
const |
|
protectedvirtual |
◆ json_interface< interaction_response >
◆ autocomplete_choices
Array of up to 25 autocomplete choices.
◆ msg
message dpp::interaction_response::msg {} |
Message tied to this response.
◆ type
Response type from dpp::interaction_response_type.
Should be one of ir_pong, ir_channel_message_with_source, or ir_deferred_channel_message_with_source.
The documentation for this struct was generated from the following files: