Package io.github.unknowncoder56.javaslc
Class User
java.lang.Object
io.github.unknowncoder56.javaslc.User
- Direct Known Subclasses:
Bot
This class describes a user or bot.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ErrorListenerTheErrorListenerfor the instance.protected final StringThe user ID of the user. -
Constructor Summary
ConstructorsConstructorDescriptionUser(String userId, ErrorListener errorListener) Constructor to build a user. -
Method Summary
Modifier and TypeMethodDescriptionGets the account creationLocalDateTimeof the user.Gets theErrorListenerof this instance.CompletableFuture<long[]> Gets the array of server IDs of the servers joined by the user.CompletableFuture<com.google.gson.JsonObject> Gets the labelJsonObjectof the user.Gets the nickname of the user.Gets the profile image URLStringof the user.Gets the user ID of the user.Gets the username of the user.isBot()Gets whether the user is a bot.voidsetErrorListener(ErrorListener errorListener) Sets theErrorListenerof this instance.
-
Field Details
-
userId
The user ID of the user. -
errorListener
TheErrorListenerfor the instance.
-
-
Constructor Details
-
User
Constructor to build a user.- Parameters:
userId- The user's user ID.errorListener- TheErrorListenerfor the instance.- See Also:
-
-
Method Details
-
getUserId
Gets the user ID of the user.- Returns:
- The user ID of the user.
-
getErrorListener
Gets theErrorListenerof this instance.- Returns:
- The
ErrorListenerof this instance.
-
setErrorListener
Sets theErrorListenerof this instance.- Parameters:
errorListener- TheErrorListenerof this instance.
-
getAccountCreationDate
Gets the account creationLocalDateTimeof the user.- Returns:
- A
CompletableFuturecontaining theLocalDateTime, that will be completed when the data is received from the API.
-
getLabelJsonObject
Gets the labelJsonObjectof the user.- Returns:
- A
CompletableFuturecontaining theJsonObject, that will be completed when the data is received from the API.
-
getNickname
Gets the nickname of the user.- Returns:
- A
CompletableFuturecontaining the nickname, that will be completed when the data is received from the API.
-
getProfileImageUrl
Gets the profile image URLStringof the user.- Returns:
- A
CompletableFuturecontaining the URLString, that will be completed when the data is received from the API.
-
getJoinedServerIds
Gets the array of server IDs of the servers joined by the user.- Returns:
- A
CompletableFuturecontaining the array of IDs, that will be completed when the data is received from the API.
-
getUsername
Gets the username of the user.- Returns:
- A
CompletableFuturecontaining the username, that will be completed when the data is received from the API.
-
isBot
Gets whether the user is a bot.- Returns:
- A
CompletableFuturecontaining aBoolean, that will be completed when the data is received from the API.
-