Interface InteractionResponse


  • @Experimental
    public interface InteractionResponse
    A handler for common operations related to an interaction followup response.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Mono<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.
      Mono<Void> deleteFollowupMessage​(long messageId)
      Delete a followup message created under this interaction.
      Mono<Void> deleteInitialResponse()
      Return a Mono that 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 a Mono that 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 a Mono that upon subscription, will modify the initial response sent when accepting this interaction with the given raw request content.
      Mono<discord4j.discordjson.json.MessageData> getInitialResponse()
      Return a Mono that upon subscription, will retrieve the initial response sent when accepting this interaction.
    • Method Detail

      • getInitialResponse

        Mono<discord4j.discordjson.json.MessageData> getInitialResponse()
        Return a Mono that upon subscription, will retrieve the initial response sent when accepting this interaction.
        Returns:
        a Mono where, upon successful completion, emits the original message. If an error is received, it is emitted through the Mono.
      • editInitialResponse

        Mono<discord4j.discordjson.json.MessageData> editInitialResponse​(discord4j.discordjson.json.WebhookMessageEditRequest request)
        Return a Mono that 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 Mono where, upon successful completion, emits the updated message. If an error is received, it is emitted through the Mono.
      • editInitialResponse

        Mono<discord4j.discordjson.json.MessageData> editInitialResponse​(MultipartRequest<discord4j.discordjson.json.WebhookMessageEditRequest> request)
        Return a Mono that 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 Mono where, upon successful completion, emits the updated message. If an error is received, it is emitted through the Mono.
      • deleteInitialResponse

        Mono<Void> deleteInitialResponse()
        Return a Mono that upon subscription, will delete the initial response sent when accepting this interaction.
        Returns:
        a Mono where, upon successful completion, emits nothing, indicating the deletion was completed. If an error is received, it is emitted through the Mono.
      • createFollowupMessage

        Mono<discord4j.discordjson.json.MessageData> createFollowupMessage​(String content)
        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 Mono where, upon successful completion, emits the sent message. If an error is received, it is emitted through the Mono.
      • 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 Mono where, upon successful completion, emits the sent message. If an error is received, it is emitted through the Mono.
      • createFollowupMessageEphemeral

        Mono<discord4j.discordjson.json.MessageData> createFollowupMessageEphemeral​(String content)
        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 Mono where, upon successful completion, emits the sent message. If an error is received, it is emitted through the Mono.
      • 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 Mono where, upon successful completion, emits the sent message. If an error is received, it is emitted through the Mono.
      • 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 using Snowflake methods.
        request - the message request to be sent as followup
        wait - whether to wait until the webhook is sent or fails, influences whether you can get an error through the return Mono.
        Returns:
        a Mono where, upon successful completion, emits the edited message. If an error is received, it is emitted through the Mono.
      • 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.
        Parameters:
        messageId - the message ID to be modified. You can convert IDs using Snowflake methods.
        request - the message request to be sent as followup
        Returns:
        a Mono where, upon successful completion, emits the edited message. If an error is received, it is emitted through the Mono.
      • deleteFollowupMessage

        Mono<Void> deleteFollowupMessage​(long messageId)
        Delete a followup message created under this interaction.
        Parameters:
        messageId - the message ID to be deleted. You can convert IDs using Snowflake methods.
        Returns:
        a Mono where, upon successful message deletion, returns a completion signal. If an error is received, it is emitted through the Mono.