41 create_interaction_response_data dataPackage02{ dataPackage };
42 if (dataPackage.
type == input_event_response_type::Deferred_Response) {
47 input_event_data newEvent = respondToInputEvent(dataPackage02);
55 co_return std::move(newEvent);
57 create_interaction_response_data dataPackage02{ dataPackage };
59 input_event_data newEvent =respondToInputEvent(dataPackage02);
61 co_return std::move(newEvent);
63 switch (dataPackage.
type) {
65 create_deferred_interaction_response_data dataPackage02{ dataPackage };
66 dataPackage02.data.flags = 64;
67 co_return respondToInputEvent(dataPackage02);
69 case input_event_response_type::Deferred_Response: {
70 create_deferred_interaction_response_data dataPackage02{ dataPackage };
71 co_return respondToInputEvent(dataPackage02);
74 create_interaction_response_data dataPackage02{ dataPackage };
75 co_return respondToInputEvent(dataPackage02);
78 edit_interaction_response_data dataPackage02{ dataPackage };
79 co_return respondToInputEvent(dataPackage02);
82 create_ephemeral_interaction_response_data dataPackage02{ dataPackage };
83 co_return respondToInputEvent(dataPackage02);
86 create_follow_up_message_data dataPackage02{ dataPackage };
87 co_return respondToInputEvent(dataPackage02);
90 edit_follow_up_message_data dataPackage02{ dataPackage };
91 co_return respondToInputEvent(dataPackage02);
94 create_ephemeral_follow_up_message_data dataPackage02{ dataPackage };
95 co_return respondToInputEvent(dataPackage02);
107 co_return input_event_data();
110 co_return input_event_data();
114 input_event_data newPackage = dataPackage;
118 respond_to_input_event_data dataPackageNew{ newPackage };
119 delete_follow_up_message_data dataPackageNewer{ dataPackageNew };
120 dataPackageNewer.timeDelay = timeDelayNew;
125 respond_to_input_event_data dataPackageNew{ newPackage };
126 delete_interaction_response_data dataPackageNewer{ dataPackageNew };
127 dataPackageNewer.timeDelay = timeDelayNew;
134 create_interaction_response_data dataPackageNew{ dataPackage };
135 auto result = interactions::createInteractionResponse(dataPackageNew);
136 input_event_data dataPackageNewer{};
137 dataPackageNewer.responseType = input_event_response_type::Deferred_Response;
138 dataPackageNewer.interactionData->applicationId = dataPackage.interactionPackage.applicationId;
139 dataPackageNewer.interactionData->token = dataPackage.interactionPackage.interactionToken;
140 dataPackageNewer.interactionData->channelId = result.channelId;
141 dataPackageNewer.interactionData->message.id = result.messageReference.messageId;
142 dataPackageNewer.interactionData->id = dataPackage.interactionPackage.interactionId;
143 dataPackageNewer.interactionData->user = result.author;
144 return dataPackageNewer;
148 message_data messageData = interactions::createInteractionResponse(dataPackage);
149 input_event_data dataPackageNewer{};
151 dataPackageNewer.interactionData->applicationId = dataPackage.interactionPackage.applicationId;
152 dataPackageNewer.interactionData->token = dataPackage.interactionPackage.interactionToken;
153 dataPackageNewer.interactionData->id = dataPackage.interactionPackage.interactionId;
154 dataPackageNewer.interactionData->channelId = messageData.channelId;
155 dataPackageNewer.interactionData->user = messageData.author;
156 dataPackageNewer.interactionData->message = messageData;
157 return dataPackageNewer;
161 message_data messageData = interactions::editInteractionResponse(dataPackage);
162 input_event_data dataPackageNewer{};
164 dataPackageNewer.interactionData->applicationId = dataPackage.interactionPackage.applicationId;
165 dataPackageNewer.interactionData->token = dataPackage.interactionPackage.interactionToken;
166 dataPackageNewer.interactionData->id = dataPackage.interactionPackage.interactionId;
167 dataPackageNewer.interactionData->channelId = messageData.channelId;
168 dataPackageNewer.interactionData->user = messageData.author;
169 dataPackageNewer.interactionData->message = messageData;
170 return dataPackageNewer;
174 message_data messageData = interactions::createFollowUpMessage(dataPackage);
175 input_event_data dataPackageNewer{};
177 dataPackageNewer.interactionData->applicationId = dataPackage.interactionPackage.applicationId;
178 dataPackageNewer.interactionData->token = dataPackage.interactionPackage.interactionToken;
179 dataPackageNewer.interactionData->id = dataPackage.interactionPackage.interactionId;
180 dataPackageNewer.interactionData->channelId = messageData.channelId;
181 dataPackageNewer.interactionData->user = messageData.author;
182 dataPackageNewer.interactionData->message = messageData;
183 return dataPackageNewer;
187 message_data messageData = interactions::editFollowUpMessage(dataPackage);
188 input_event_data dataPackageNewer{};
190 dataPackageNewer.interactionData->applicationId = dataPackage.interactionPackage.applicationId;
191 dataPackageNewer.interactionData->token = dataPackage.interactionPackage.interactionToken;
192 dataPackageNewer.interactionData->id = dataPackage.interactionPackage.interactionId;
193 dataPackageNewer.interactionData->channelId = messageData.channelId;
194 dataPackageNewer.interactionData->user = messageData.author;
195 dataPackageNewer.interactionData->message = messageData;
196 return dataPackageNewer;
200 create_interaction_response_data dataPackageNew{ dataPackage };
201 message_data messageData = interactions::createInteractionResponse(dataPackageNew);
202 input_event_data dataPackageNewer{};
204 dataPackageNewer.interactionData->applicationId = dataPackage.interactionPackage.applicationId;
205 dataPackageNewer.interactionData->token = dataPackage.interactionPackage.interactionToken;
206 dataPackageNewer.interactionData->id = dataPackage.interactionPackage.interactionId;
207 dataPackageNewer.interactionData->channelId = messageData.channelId;
208 dataPackageNewer.interactionData->user = messageData.author;
209 dataPackageNewer.interactionData->message = messageData;
210 return dataPackageNewer;
214 create_follow_up_message_data dataPackageNew{ dataPackage };
215 message_data messageData = interactions::createFollowUpMessage(dataPackageNew);
216 input_event_data dataPackageNewer{};
218 dataPackageNewer.interactionData->applicationId = dataPackage.interactionPackage.applicationId;
219 dataPackageNewer.interactionData->token = dataPackage.interactionPackage.interactionToken;
220 dataPackageNewer.interactionData->id = dataPackage.interactionPackage.interactionId;
221 dataPackageNewer.interactionData->channelId = messageData.channelId;
222 dataPackageNewer.interactionData->user = messageData.author;
223 dataPackageNewer.interactionData->message = messageData;
224 return dataPackageNewer;
A co_routine - representing a potentially asynchronous operation/function.
For creating a deferred interaction response.
For creating an ephemeral follow up message_data.
For creating an ephemeral interaction response.
For creating a follow up message_data.
For creating an interaction response.
For editing a follow up message_data.
For editing an interaction response.
static co_routine< void > deleteFollowUpMessageAsync(delete_follow_up_message_data dataPackage)
Deletes a follow up message_data.
static co_routine< void > deleteInteractionResponseAsync(delete_interaction_response_data dataPackage)
Deletes an interaction respnose.
@ Ephemeral_Interaction_Response
Ephemeral interaction response.
@ Ephemeral_Deferred_Response
Deferred ephemeral response.
@ Interaction_Response
Interaction response.
@ Modal_Interaction_Response
Respond to an interaction with a popup modal.
@ Edit_Interaction_Response
Interaction response edit.
@ Application_Command_AutoComplete_Result
Respond to an autocomplete interaction with suggested choices.
@ Edit_Follow_Up_Message
Follow-up message edit.
@ Ephemeral_Follow_Up_Message
Ephemeral follow-up message_data.
@ Follow_Up_Message
Follow-up message_data.
@ Deferred_Update_Message
For components, ack an interaction and edit the original message later; the user does not see a loadi...
@ Application_Command_Autocomplete_Result
Respond to an autocomplete interaction with suggested choices.
@ Update_Message
For components, edit the message the component was attached to.
@ Message_Component
Message component.
@ Application_Command_Autocomplete
Application command autocomplete.
DCA_INLINE auto newThreadAwaitable()
An awaitable that can be used to launch the co_routine onto a new thread - as well as return the hand...
The main namespace for the forward-facing interfaces.