public class UserImpl extends java.lang.Object implements User
Modifier and Type | Field and Description |
---|---|
protected JDAImpl |
api |
protected java.lang.String |
avatarId |
protected boolean |
bot |
protected java.lang.String |
discriminator |
protected boolean |
fake |
protected java.lang.String |
id |
protected java.lang.String |
name |
protected PrivateChannel |
privateChannel |
Constructor and Description |
---|
UserImpl(java.lang.String id,
JDAImpl api) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getAsMention()
Retrieve a Mention for this Entity.
|
java.lang.String |
getAvatarId()
The Discord Id for this user's avatar image.
|
java.lang.String |
getAvatarUrl()
The URL for the for the user's avatar image.
|
java.lang.String |
getDefaultAvatarId()
The Discord Id for this user's default avatar image.
|
java.lang.String |
getDefaultAvatarUrl()
The URL for the for the user's default avatar image.
|
java.lang.String |
getDiscriminator()
The discriminator of the
User . |
java.lang.String |
getId()
The Snowflake id of this entity.
|
JDA |
getJDA()
Returns the
JDA instance of this User |
java.lang.String |
getName()
The username of the
User . |
PrivateChannel |
getPrivateChannel()
Gets the
PrivateChannel of this
User for use in sending direct messages. |
int |
hashCode() |
boolean |
hasPrivateChannel()
Whether or not the currently logged in user and this user have a currently open
PrivateChannel or not. |
boolean |
isBot()
Returns whether or not the given user is a Bot-Account (special badge in client, some different behaviour)
|
boolean |
isFake()
Describes whether an entity is fake or not.
|
RestAction<PrivateChannel> |
openPrivateChannel() |
UserImpl |
setAvatarId(java.lang.String avatarId) |
UserImpl |
setBot(boolean bot) |
UserImpl |
setDiscriminator(java.lang.String discriminator) |
UserImpl |
setFake(boolean fake) |
UserImpl |
setName(java.lang.String name) |
UserImpl |
setPrivateChannel(PrivateChannel privateChannel) |
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getCreationTime
protected final java.lang.String id
protected final JDAImpl api
protected java.lang.String name
protected java.lang.String discriminator
protected java.lang.String avatarId
protected PrivateChannel privateChannel
protected boolean bot
protected boolean fake
public UserImpl(java.lang.String id, JDAImpl api)
public java.lang.String getName()
User
User
. Length is between 2 and 32 characters (inclusive).public java.lang.String getDiscriminator()
User
User
. Used to differentiate between users with the same usernames.getDiscriminator
in interface User
User
discriminator.public java.lang.String getAvatarId()
User
getAvatarId
in interface User
User
avatar id.public java.lang.String getAvatarUrl()
User
getAvatarUrl
in interface User
User
avatar url.public java.lang.String getDefaultAvatarId()
User
getDefaultAvatarId
in interface User
User
default avatar id.public java.lang.String getDefaultAvatarUrl()
User
getDefaultAvatarUrl
in interface User
User
default avatar url.public boolean hasPrivateChannel()
User
PrivateChannel
or not.hasPrivateChannel
in interface User
public RestAction<PrivateChannel> openPrivateChannel()
openPrivateChannel
in interface User
public PrivateChannel getPrivateChannel()
User
PrivateChannel
of this
User
for use in sending direct messages.getPrivateChannel
in interface User
PrivateChannel
that is associated with this User
.public boolean isBot()
User
public JDA getJDA()
User
JDA
instance of this Userpublic java.lang.String getAsMention()
IMentionable
getAsMention
in interface IMentionable
public java.lang.String getId()
ISnowflake
getId
in interface ISnowflake
public boolean isFake()
IFakeable
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public UserImpl setName(java.lang.String name)
public UserImpl setDiscriminator(java.lang.String discriminator)
public UserImpl setAvatarId(java.lang.String avatarId)
public UserImpl setPrivateChannel(PrivateChannel privateChannel)
public UserImpl setBot(boolean bot)
public UserImpl setFake(boolean fake)