Package discord4j.rest.interaction
Interface InteractionHandler
- All Known Implementing Classes:
FollowupInteractionHandler
An interaction handler is responsible for providing an initial response and followup for incoming interactions.
-
Method Summary
Modifier and TypeMethodDescriptionPublisher<?>onInteractionResponse(InteractionResponse response) Return a reactive sequence to work with an interaction token after an initial response has been sent.discord4j.discordjson.json.InteractionResponseDataresponse()Return the response to be sent to Discord on interaction create.
-
Method Details
-
response
discord4j.discordjson.json.InteractionResponseData response()Return the response to be sent to Discord on interaction create.- Returns:
- the raw data to build an initial interaction response
-
onInteractionResponse
Return a reactive sequence to work with an interaction token after an initial response has been sent.- Parameters:
response- a handler with all common actions to derive the asynchronous followup sequence- Returns:
- a publisher, like a
MonoorFluxto be subscribed for the duration of the interaction token, after which will be cancelled throughFlux.take(Duration)semantics.
-