Class User

java.lang.Object
io.github.unknowncoder56.javaslc.User
Direct Known Subclasses:
Bot

public class User extends Object
This class describes a user or bot.
  • Field Details

    • userId

      protected final long userId
      The user ID of the user.
    • errorListener

      protected ErrorListener errorListener
      The ErrorListener for the instance.
  • Constructor Details

    • User

      public User(long userId, ErrorListener errorListener)
      Constructor to build a user.
      Parameters:
      userId - The user's user ID.
      errorListener - The ErrorListener for the instance.
      See Also:
  • Method Details

    • getUserId

      public long getUserId()
      Gets the user ID of the user.
      Returns:
      The user ID of the user.
    • getErrorListener

      public ErrorListener getErrorListener()
      Gets the ErrorListener of this instance.
      Returns:
      The ErrorListener of this instance.
    • setErrorListener

      public void setErrorListener(ErrorListener errorListener)
      Sets the ErrorListener of this instance.
      Parameters:
      errorListener - The ErrorListener of this instance.
    • getAccountCreationDate

      public CompletableFuture<LocalDateTime> getAccountCreationDate()
      Gets the account creation LocalDateTime of the user.
      Returns:
      A CompletableFuture containing the LocalDateTime, that will be completed when the data is received from the API.
    • getLabelJsonObject

      public CompletableFuture<com.google.gson.JsonObject> getLabelJsonObject()
      Gets the label JsonObject of the user.
      Returns:
      A CompletableFuture containing the JsonObject, that will be completed when the data is received from the API.
    • getNickname

      public CompletableFuture<String> getNickname()
      Gets the nickname of the user.
      Returns:
      A CompletableFuture containing the nickname, that will be completed when the data is received from the API.
    • getProfileImageUrl

      public CompletableFuture<String> getProfileImageUrl()
      Gets the profile image URL String of the user.
      Returns:
      A CompletableFuture containing the URL String, that will be completed when the data is received from the API.
    • getJoinedServerIds

      public CompletableFuture<long[]> getJoinedServerIds()
      Gets the array of server IDs of the servers joined by the user.
      Returns:
      A CompletableFuture containing the array of IDs, that will be completed when the data is received from the API.
    • getUsername

      public CompletableFuture<String> getUsername()
      Gets the username of the user.
      Returns:
      A CompletableFuture containing the username, that will be completed when the data is received from the API.
    • isBot

      public CompletableFuture<Boolean> isBot()
      Gets whether the user is a bot.
      Returns:
      A CompletableFuture containing a Boolean, that will be completed when the data is received from the API.