Package net.dv8tion.jda.api.entities
Interface UserSnowflake
- All Superinterfaces:
Formattable
,IMentionable
,ISnowflake
Represents an abstract user reference by only the user ID.
This is used for methods which only need a user ID to function, you cannot use this for getting names or similar.
To get information about a user by their ID you can use JDA.retrieveUserById(long)
or JDA.getUserById(long)
instead.
-
Method Summary
Modifier and TypeMethodDescriptionstatic UserSnowflake
fromId
(long id) Creates a User instance which only wraps an ID.static UserSnowflake
Creates a User instance which only wraps an ID.default ImageProxy
Returns anImageProxy
for this user's default avatar.The Discord ID for this user's default avatar image.default String
The URL for the user's default avatar image.Methods inherited from interface net.dv8tion.jda.api.entities.IMentionable
formatTo, getAsMention
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
Method Details
-
fromId
Creates a User instance which only wraps an ID.- Parameters:
id
- The user id- Returns:
- A user snowflake instance
- See Also:
-
fromId
Creates a User instance which only wraps an ID.- Parameters:
id
- The user id- Returns:
- A user snowflake instance
- Throws:
IllegalArgumentException
- If the provided ID is not a valid snowflake- See Also:
-
getDefaultAvatarId
The Discord ID for this user's default avatar image.- Returns:
- Never-null String containing the user's default avatar id.
-
getDefaultAvatarUrl
The URL for the user's default avatar image.- Returns:
- Never-null String containing the user's default avatar url.
-
getDefaultAvatar
Returns anImageProxy
for this user's default avatar.- Returns:
- Never-null
ImageProxy
of this user's default avatar - See Also:
-