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 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 Optional<User> getUser​()
        Gets the user of the event.
        Returns:
        The user of the event.
      • requestUser

        default 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.