public interface Member extends IMentionable
Contains all guild-specific information about a User. (Roles, Nickname, VoiceStatus etc.)
Modifier and Type | Method and Description |
---|---|
boolean |
canInteract(Emote emote) |
boolean |
canInteract(Member member) |
boolean |
canInteract(Role role) |
java.awt.Color |
getColor()
The
Color of this Member's name in a Guild. |
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()
|
java.util.List<Permission> |
getPermissions()
The Guild-Wide Permissions this Member holds.
|
java.util.List<Permission> |
getPermissions(Channel channel)
The Permissions this Member holds in the specified
Channel .Permissions returned by this may be different from getPermissions() due to the Channel's PermissionOverrides . |
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 |
hasPermission(Channel channel,
java.util.Collection<Permission> permissions)
Checks whether or not this Member has the
Permissions in the provided
Collection<Permission> in the specified Channel. |
boolean |
hasPermission(Channel channel,
Permission... permissions)
Checks whether or not this Member has the given
Permissions in the specified Channel. |
boolean |
hasPermission(java.util.Collection<Permission> permissions)
Checks whether or not this Member has the
Permissions in the provided
Collection<Permission> in the Guild. |
boolean |
hasPermission(Permission... permissions)
Checks whether or not this Member has the given
Permissions in the Guild. |
getAsMention
JDA getJDA()
java.time.OffsetDateTime getJoinDate()
Time
this Member joined the Guild.GuildVoiceState getVoiceState()
VoiceState
of this Member.This can be used to get the Member's VoiceChannel.
VoiceState
Game getGame()
OnlineStatus getOnlineStatus()
OnlineStatus
of the User
.java.lang.String getNickname()
java.lang.String getEffectiveName()
java.util.List<Role> getRoles()
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.
java.util.List<Permission> getPermissions()
java.util.List<Permission> getPermissions(Channel channel)
Channel
.getPermissions()
due to the Channel's PermissionOverrides
.boolean hasPermission(Permission... permissions)
Permissions
in the Guild.permissions
- Permissions to check for.boolean hasPermission(java.util.Collection<Permission> permissions)
Permissions
in the provided
Collection<Permission> in the Guild.permissions
- Permissions to check for.boolean hasPermission(Channel channel, Permission... permissions)
Permissions
in the specified Channel.channel
- The Channel
in which to check.permissions
- Permissions to check for.boolean hasPermission(Channel channel, java.util.Collection<Permission> permissions)
Permissions
in the provided
Collection<Permission> in the specified Channel.channel
- The Channel
in which to check.permissions
- Permissions to check for.boolean canInteract(Member member)
boolean canInteract(Role role)
boolean canInteract(Emote emote)