Class UserInteractionEvent


@Experimental public class UserInteractionEvent extends ApplicationCommandInteractionEvent
Dispatched when a user uses a user command (user context menu)

You are required to respond to this interaction within a three-second window by using one of the following:

See InteractionCreateEvent for more details about valid operations.

This is not directly dispatched by Discord, but is a utility specialization of ApplicationCommandInteractionEvent.

  • Constructor Details

  • Method Details

    • getResolvedUser

      public User getResolvedUser()
      Gets the resolved targeted User.
      Returns:
      The resolved targeted User.
    • getTargetId

      public Snowflake getTargetId()
      Gets the ID of the targeted User.
      Returns:
      The ID of the targeted User.
    • getTargetUser

      public Mono<User> getTargetUser()
      Requests to retrieve the targeted User.
      Returns:
      A Mono where, upon successful completion, emits the User targeted by the user. If an error is received, it is emitted through the Mono.
    • getTargetUser

      public Mono<User> getTargetUser(EntityRetrievalStrategy retrievalStrategy)
      Requests to retrieve the targeted User.
      Parameters:
      retrievalStrategy - The strategy to use to get the target User
      Returns:
      A Mono where, upon successful completion, emits the User targeted by the user. If an error is received, it is emitted through the Mono.