public class ReadonlyUser
extends java.lang.Object
implements org.json.JSONString
| Constructor and Description |
|---|
ReadonlyUser(long id,
short discriminator,
boolean bot,
@NotNull java.lang.String name,
@Nullable java.lang.String avatar) |
| Modifier and Type | Method and Description |
|---|---|
@Nullable java.lang.String |
getAvatarId()
The avatar id of this user, or
null if no avatar is set. |
java.lang.String |
getDiscriminator()
The 4 digit discriminator of this user
This is show in the client after the # when viewing profiles. |
long |
getId()
The id of this user
|
@NotNull java.lang.String |
getName()
The name of this user, this is the username and not the guild-specific nickname.
|
boolean |
isBot()
Whether this is a bot or not, webhook authors are always bots.
|
java.lang.String |
toJSONString() |
java.lang.String |
toString()
JSON representation of this user
|
public ReadonlyUser(long id,
short discriminator,
boolean bot,
@NotNull
@NotNull java.lang.String name,
@Nullable
@Nullable java.lang.String avatar)
public long getId()
public java.lang.String getDiscriminator()
# when viewing profiles.public boolean isBot()
@NotNull @JSONPropertyName(value="username") public @NotNull java.lang.String getName()
@Nullable @JSONPropertyName(value="avatar_id") public @Nullable java.lang.String getAvatarId()
null if no avatar is set.public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toJSONString()
toJSONString in interface org.json.JSONString