public interface Role extends ISnowflake, IMentionable, IPermissionHolder, java.lang.Comparable<Role>
Modifier and Type | Method and Description |
---|---|
boolean |
canInteract(Role role) |
RestAction<java.lang.Void> |
delete() |
java.awt.Color |
getColor()
The color this
Role is displayed in. |
Guild |
getGuild()
Returns the
Guild this Role exists in |
JDA |
getJDA()
Returns the
JDA instance of this Role |
RoleManager |
getManager()
Returns the
RoleManager for this Role. |
RoleManagerUpdatable |
getManagerUpdatable() |
java.lang.String |
getName()
The Name of the
Role . |
long |
getPermissionsRaw()
|
int |
getPosition()
|
int |
getPositionRaw()
The actual position of the
Role as stored and given by Discord. |
boolean |
isHoisted()
Is this
Role hoisted?Members in a hoisted role are displayed in their own grouping on the user-list |
boolean |
isManaged()
Is this
Role managed?(Via plugins like Twitch). |
boolean |
isMentionable()
Returns wheter or not this Role is mentionable
|
getCreationTime, getId
getAsMention
getPermissions, hasPermission, hasPermission, hasPermission, hasPermission
int getPosition()
Role
in the Guild
hierarchy.Role
always return -1.Role
as integer.int getPositionRaw()
Role
as stored and given by Discord.
Role positions are actually based on a pairing of the creation time (as stored in the snowflake id)
and the position. If 2 or more roles share the same position then they are sorted based on their creation date.
The more recent a role was created, the lower it is in the heirarchy. This is handled by getPosition()
and it is most likely the method you want. If, for some reason, you want the actual position of the
Role then this method will give you that value.Role
.java.lang.String getName()
Role
.Role
.boolean isManaged()
Role
managed?Role
is managed.boolean isHoisted()
Role
hoisted?Role
is hoisted.boolean isMentionable()
long getPermissionsRaw()
long
representation of the literal permissions that this Role
has.Channel
.java.awt.Color getColor()
Role
is displayed in.boolean canInteract(Role role)
Guild getGuild()
Guild
this Role exists ingetGuild
in interface IPermissionHolder
RoleManager getManager()
RoleManager
for this Role.
In the RoleManager, you can modify all its values.RoleManagerUpdatable getManagerUpdatable()
RestAction<java.lang.Void> delete()