Interface OptionalUserEvent

    • Method Detail

      • getUserId

        long getUserId()
        Gets the id of the user involved in the event.
        Returns:
        The id of the user involved in the event.
      • getUserIdAsString

        default java.lang.String getUserIdAsString()
        Gets the id of the user involved in the event.
        Returns:
        The id of the user involved in the event.
        See Also:
        getUserId()
      • getUser

        default java.util.Optional<User> getUser()
        Gets the user of the event.
        Returns:
        The user of the event.
      • requestUser

        default java.util.concurrent.CompletableFuture<User> requestUser()
        Requests a user from Discord with the given id.

        If the user is in the cache, the user is served from the cache.

        Returns:
        The user.