Class ComponentInteractEvent

    • Method Detail

      • getCustomId

        public String getCustomId()
        Gets the developer-defined custom id associated with the component.
        Returns:
        The component's custom id.
        See Also:
        Button.getCustomId()
      • getMessage

        public Optional<Message> getMessage()
        Gets the message the component is on.

        For ephemeral messages, only the ID is present. Use getMessageId()

        Returns:
        The message the component is on.
      • getMessageId

        public Snowflake getMessageId()
        Gets the ID of the message the component is on.
        Returns:
        The ID of the message the component is on.
      • edit

        public discord4j.core.spec.InteractionApplicationCommandCallbackEditMono edit()
        Requests to respond to the interaction by immediately editing the message the button is on. Properties specifying how to edit the message can be set via the withXxx methods of the returned InteractionApplicationCommandCallbackEditMono.
        Returns:
        A InteractionApplicationCommandCallbackEditMono where, upon successful completion, emits nothing; indicating the interaction response has been sent. If an error is received, it is emitted through the InteractionApplicationCommandCallbackMono.
      • edit

        public Mono<Void> edit​(discord4j.core.spec.InteractionApplicationCommandCallbackSpec spec)
        Requests to respond to the interaction by immediately editing the message the button is on.
        Parameters:
        spec - an immutable object that specifies how to edit the message the button is on.
        Returns:
        A Mono where, upon successful completion, emits nothing; indicating the interaction response has been sent. If an error is received, it is emitted through the Mono.
      • acknowledgeEphemeral

        public Mono<Void> acknowledgeEphemeral()
        Description copied from class: InteractionCreateEvent
        Acknowledges the interaction indicating a response will be edited later. Only the invoking user sees a loading state.
        Overrides:
        acknowledgeEphemeral in class InteractionCreateEvent
        Returns:
        A Mono where, upon successful completion, emits nothing, acknowledging the interaction and indicating a response will be edited later. If an error is received, it is emitted through the Mono.