java.util.Formattable, IMentionable, IPermissionHolderpublic interface Member extends IMentionable, IPermissionHolder
Contains all guild-specific information about a User. (Roles, Nickname, VoiceStatus etc.)
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
canInteract(Emote emote) |
Whether this Member can interact with the provided
Emote
(use in a message) |
boolean |
canInteract(Member member) |
Whether this Member can interact with the provided Member
(kick/ban/etc.)
|
boolean |
canInteract(Role role) |
Whether this Member can interact with the provided
Role
(kick/ban/move/modify/delete/etc.) |
java.awt.Color |
getColor() |
The
Color of this Member's name in a Guild. |
int |
getColorRaw() |
The raw RGB value for the color of this member.
|
TextChannel |
getDefaultChannel() |
The default
TextChannel for a Member. |
java.lang.String |
getEffectiveName() |
Retrieves the Name displayed in the official Discord Client.
|
Game |
getGame() |
The game that the user is currently playing.
|
Guild |
getGuild() |
The Guild in which this Member is represented.
|
JDA |
getJDA() |
The JDA instance.
|
java.time.OffsetDateTime |
getJoinDate() |
The
Time this Member joined the Guild. |
java.lang.String |
getNickname() |
Returns the current nickname of this Member for the parent Guild.
|
OnlineStatus |
getOnlineStatus() |
Returns the
OnlineStatus of the User. |
java.util.List<Permission> |
getPermissions(Channel channel) |
The Permissions this Member holds in the specified
Channel. |
java.util.List<Role> |
getRoles() |
The roles applied to this Member.
|
User |
getUser() |
The user wrapped by this Entity.
|
GuildVoiceState |
getVoiceState() |
The
VoiceState of this Member. |
boolean |
isOwner() |
Checks whether this member is the owner of its related
Guild. |
formatTo, getAsMentiongetPermissions, hasPermission, hasPermission, hasPermission, hasPermissionGuild getGuild()
getGuild in interface IPermissionHolderGuildJDA getJDA()
java.time.OffsetDateTime getJoinDate()
Time this Member joined the Guild.GuildVoiceState getVoiceState()
VoiceState of this Member.
CacheFlag.VOICE_STATE is disabled manually
This can be used to get the Member's VoiceChannel using GuildVoiceState.getChannel().
GuildVoiceStateGame getGame()
OnlineStatus getOnlineStatus()
OnlineStatus of the User.java.lang.String getNickname()
This can be changed using
GuildController.setNickname(Member, String).
java.lang.String getEffectiveName()
java.util.List<Role> getRoles()
A Member's roles can be changed using the addRolesToMember, removeRolesFromMember, and modifyMemberRoles
methods in GuildController.
The Public Role (@everyone) is not included in the returned immutable list of roles
It is implicit that every member holds the Public Role in a Guild thus it is not listed here!
Roles for this Member.java.awt.Color getColor()
Color of this Member's name in a Guild.
This is determined by the color of the highest role assigned to them that does not have the default color.
If all roles have default color, this returns null.
getColorRaw()int getColorRaw()
Role.DEFAULT_COLOR_RAW
if this member uses the default color (special property, it changes depending on theme used in the client)java.util.List<Permission> getPermissions(Channel channel)
Channel.
IPermissionHolder.getPermissions()
due to the Channel's PermissionOverrides.channel - The Channel of which to get Permissions forboolean canInteract(Member member)
member - The target Member to checkjava.lang.NullPointerException - if the specified Member is nulljava.lang.IllegalArgumentException - if the specified Member is not from the same guildPermissionUtil.canInteract(Member, Member)boolean canInteract(Role role)
Role
(kick/ban/move/modify/delete/etc.)role - The target Role to checkjava.lang.NullPointerException - if the specified Role is nulljava.lang.IllegalArgumentException - if the specified Role is not from the same guildPermissionUtil.canInteract(Member, Role)boolean canInteract(Emote emote)
Emote
(use in a message)emote - The target Emote to checkjava.lang.NullPointerException - if the specified Emote is nulljava.lang.IllegalArgumentException - if the specified Emote is not from the same guildPermissionUtil.canInteract(Member, Emote)boolean isOwner()
Guild.@Nullable TextChannel getDefaultChannel()
TextChannel for a Member.
Permission.MESSAGE_READ permissions. If this requirement doesn't apply for
any channel in the guild, this method returns null.TextChannel representing the default channel for this member
or null if no such channel exists.