Package discord4j.rest.interaction
Interface InteractionResponse
A handler for common operations related to an interaction followup response.
-
Method Summary
Modifier and TypeMethodDescriptionMono<discord4j.discordjson.json.MessageData>createFollowupMessage(MultipartRequest<? extends discord4j.discordjson.json.WebhookExecuteRequest> request) Create a new followup message using the provided request.Mono<discord4j.discordjson.json.MessageData>createFollowupMessage(String content) Create a new followup message with the given content.Mono<discord4j.discordjson.json.MessageData>createFollowupMessageEphemeral(MultipartRequest<discord4j.discordjson.json.WebhookExecuteRequest> request) Create a new ephemeral followup message using the provided request.Mono<discord4j.discordjson.json.MessageData>createFollowupMessageEphemeral(String content) Create a new ephemeral followup message with the given content.deleteFollowupMessage(long messageId) Delete a followup message created under this interaction.Return aMonothat upon subscription, will delete the initial response sent when accepting this interaction.Mono<discord4j.discordjson.json.MessageData>editFollowupMessage(long messageId, discord4j.discordjson.json.WebhookMessageEditRequest request, boolean wait) Modify the given message by ID using the provided request.Mono<discord4j.discordjson.json.MessageData>editFollowupMessage(long messageId, MultipartRequest<discord4j.discordjson.json.WebhookMessageEditRequest> request) Modify the given message by ID using the provided request.Mono<discord4j.discordjson.json.MessageData>editInitialResponse(discord4j.discordjson.json.WebhookMessageEditRequest request) Return aMonothat upon subscription, will modify the initial response sent when accepting this interaction with the given raw request content.Mono<discord4j.discordjson.json.MessageData>editInitialResponse(MultipartRequest<discord4j.discordjson.json.WebhookMessageEditRequest> request) Return aMonothat upon subscription, will modify the initial response sent when accepting this interaction with the given raw request content.Mono<discord4j.discordjson.json.MessageData>Return aMonothat upon subscription, will retrieve the initial response sent when accepting this interaction.
-
Method Details
-
getInitialResponse
Mono<discord4j.discordjson.json.MessageData> getInitialResponse()Return aMonothat upon subscription, will retrieve the initial response sent when accepting this interaction.- Returns:
- a
Monowhere, upon successful completion, emits the original message. If an error is received, it is emitted through theMono.
-
editInitialResponse
Mono<discord4j.discordjson.json.MessageData> editInitialResponse(discord4j.discordjson.json.WebhookMessageEditRequest request) Return aMonothat upon subscription, will modify the initial response sent when accepting this interaction with the given raw request content.- Parameters:
request- the raw request to be sent as new initial response content- Returns:
- a
Monowhere, upon successful completion, emits the updated message. If an error is received, it is emitted through theMono.
-
editInitialResponse
Mono<discord4j.discordjson.json.MessageData> editInitialResponse(MultipartRequest<discord4j.discordjson.json.WebhookMessageEditRequest> request) Return aMonothat upon subscription, will modify the initial response sent when accepting this interaction with the given raw request content.- Parameters:
request- the raw request to be sent as new initial response content- Returns:
- a
Monowhere, upon successful completion, emits the updated message. If an error is received, it is emitted through theMono.
-
deleteInitialResponse
Return aMonothat upon subscription, will delete the initial response sent when accepting this interaction.- Returns:
- a
Monowhere, upon successful completion, emits nothing, indicating the deletion was completed. If an error is received, it is emitted through theMono.
-
createFollowupMessage
Create a new followup message with the given content. This uses a webhook tied to the interaction ID and token.- Parameters:
content- the text content included in the followup- Returns:
- a
Monowhere, upon successful completion, emits the sent message. If an error is received, it is emitted through theMono.
-
createFollowupMessage
Mono<discord4j.discordjson.json.MessageData> createFollowupMessage(MultipartRequest<? extends discord4j.discordjson.json.WebhookExecuteRequest> request) Create a new followup message using the provided request. This uses a webhook tied to the interaction ID and token.- Parameters:
request- the message request to be sent as followup- Returns:
- a
Monowhere, upon successful completion, emits the sent message. If an error is received, it is emitted through theMono.
-
createFollowupMessageEphemeral
Create a new ephemeral followup message with the given content. This uses a webhook tied to the interaction ID and token.- Parameters:
content- the text content included in the followup- Returns:
- a
Monowhere, upon successful completion, emits the sent message. If an error is received, it is emitted through theMono.
-
createFollowupMessageEphemeral
Mono<discord4j.discordjson.json.MessageData> createFollowupMessageEphemeral(MultipartRequest<discord4j.discordjson.json.WebhookExecuteRequest> request) Create a new ephemeral followup message using the provided request. This uses a webhook tied to the interaction ID and token.- Parameters:
request- the message request to be sent as followup- Returns:
- a
Monowhere, upon successful completion, emits the sent message. If an error is received, it is emitted through theMono.
-
editFollowupMessage
Mono<discord4j.discordjson.json.MessageData> editFollowupMessage(long messageId, discord4j.discordjson.json.WebhookMessageEditRequest request, boolean wait) Modify the given message by ID using the provided request. This uses a webhook tied to the interaction ID and token.- Parameters:
messageId- the message ID to be modified. You can convert IDs usingSnowflakemethods.request- the message request to be sent as followupwait- whether to wait until the webhook is sent or fails, influences whether you can get an error through the returnMono.- Returns:
- a
Monowhere, upon successful completion, emits the edited message. If an error is received, it is emitted through theMono.
-
editFollowupMessage
Mono<discord4j.discordjson.json.MessageData> editFollowupMessage(long messageId, MultipartRequest<discord4j.discordjson.json.WebhookMessageEditRequest> request) Modify the given message by ID using the provided request. This uses a webhook tied to the interaction ID and token. -
deleteFollowupMessage
Delete a followup message created under this interaction.
-