Package net.dv8tion.jda.api.utils
Class WidgetUtil.Widget.Member
- java.lang.Object
-
- net.dv8tion.jda.api.utils.WidgetUtil.Widget.Member
-
- All Implemented Interfaces:
java.util.Formattable,IMentionable,ISnowflake
- Enclosing class:
- WidgetUtil.Widget
public static class WidgetUtil.Widget.Member extends java.lang.Object implements IMentionable
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)ActivitygetActivity()The game that the member is currently playing.java.lang.StringgetAsMention()Retrieve a Mention for this Entity.java.lang.StringgetAvatarId()Gets the avatar hash of the member, or null if they do not have an avatar set.java.lang.StringgetAvatarUrl()Gets the avatar url of the member, or null if they do not have an avatar set.java.lang.StringgetDefaultAvatarId()Gets the asset id of the member's default avatarjava.lang.StringgetDefaultAvatarUrl()Gets the url of the member's default avatarjava.lang.StringgetDiscriminator()Gets the discriminator of the memberjava.lang.StringgetEffectiveAvatarUrl()The URL for the user's avatar image
If they do not have an avatar set, this will return the URL of their default avatarjava.lang.StringgetEffectiveName()Gets the visible name of the member.longgetIdLong()The Snowflake id of this entity.java.lang.StringgetName()Returns the username of the memberjava.lang.StringgetNickname()Gets the nickname of the member.OnlineStatusgetOnlineStatus()Gets the online status of the member.WidgetUtil.Widget.VoiceStategetVoiceState()The current voice state of the member.WidgetUtil.WidgetgetWidget()Gets the widget that to which this member belongsinthashCode()booleanisBot()Returns whether or not the given member is a bot accountjava.lang.StringtoString()-
Methods inherited from interface net.dv8tion.jda.api.entities.IMentionable
formatTo
-
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getTimeCreated
-
-
-
-
Method Detail
-
isBot
public boolean isBot()
Returns whether or not the given member is a bot account- Returns:
- true if the member is a bot, false otherwise
-
getName
@Nonnull public java.lang.String getName()
Returns the username of the member- Returns:
- the username of the member
-
getIdLong
public long getIdLong()
Description copied from interface:ISnowflakeThe Snowflake id of this entity. This is unique to every entity and will never change.- Specified by:
getIdLongin interfaceISnowflake- Returns:
- Long containing the Id.
-
getAsMention
@Nonnull public java.lang.String getAsMention()
Description copied from interface:IMentionableRetrieve a Mention for this Entity. For the publicRole(@everyone), this will return the literal string"@everyone".- Specified by:
getAsMentionin interfaceIMentionable- Returns:
- A resolvable mention.
-
getDiscriminator
@Nonnull public java.lang.String getDiscriminator()
Gets the discriminator of the member- Returns:
- the never-null discriminator of the member
-
getAvatarId
@Nullable public java.lang.String getAvatarId()
Gets the avatar hash of the member, or null if they do not have an avatar set.- Returns:
- possibly-null String containing the avatar hash of the member
-
getAvatarUrl
@Nullable public java.lang.String getAvatarUrl()
Gets the avatar url of the member, or null if they do not have an avatar set.- Returns:
- possibly-null String containing the avatar url of the member
-
getDefaultAvatarId
@Nonnull public java.lang.String getDefaultAvatarId()
Gets the asset id of the member's default avatar- Returns:
- never-null String containing the asset id of the member's default avatar
-
getDefaultAvatarUrl
@Nonnull public java.lang.String getDefaultAvatarUrl()
Gets the url of the member's default avatar- Returns:
- never-null String containing the url of the member's default avatar
-
getEffectiveAvatarUrl
@Nonnull public java.lang.String getEffectiveAvatarUrl()
The URL for the user's avatar image
If they do not have an avatar set, this will return the URL of their default avatar- Returns:
- Never-null String containing the member's effective avatar url.
-
getNickname
@Nullable public java.lang.String getNickname()
Gets the nickname of the member. If they do not have a nickname on the guild, this will return null;- Returns:
- possibly-null String containing the nickname of the member
-
getEffectiveName
@Nonnull public java.lang.String getEffectiveName()
Gets the visible name of the member. If they have a nickname set, this will be their nickname. Otherwise, it will be their username.- Returns:
- never-null String containing the member's effective (visible) name
-
getOnlineStatus
@Nonnull public OnlineStatus getOnlineStatus()
Gets the online status of the member. The widget does not show offline members, so this status should never be offline- Returns:
- the
OnlineStatusof the member
-
getActivity
@Nullable public Activity getActivity()
The game that the member is currently playing.
This game cannot be a stream. If the user is not currently playing a game, this will return null.- Returns:
- Possibly-null
Activitycontaining the game that the member is currently playing.
-
getVoiceState
@Nonnull public WidgetUtil.Widget.VoiceState getVoiceState()
The current voice state of the member.
If the user is not in voice, this will return a VoiceState with a null channel.- Returns:
- never-null VoiceState of the member
-
getWidget
@Nonnull public WidgetUtil.Widget getWidget()
Gets the widget that to which this member belongs- Returns:
- the Widget that holds this member
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-