Interface RoleMixin<T extends RoleMixin<T>>
- All Superinterfaces:
Comparable<Role>
,Formattable
,IDetachableEntity
,IDetachableEntityMixin
,IMentionable
,IPermissionHolder
,ISnowflake
,Role
- All Known Implementing Classes:
DetachedRoleImpl
,RoleImpl
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.entities.Role
Role.RoleTags
-
Field Summary
Fields inherited from interface net.dv8tion.jda.api.entities.Role
DEFAULT_COLOR_RAW
-
Method Summary
Modifier and TypeMethodDescriptiondefault int
default RoleAction
createCopy
(Guild guild) setColor
(int color) setHoisted
(boolean hoisted) setManaged
(boolean managed) setMentionable
(boolean mentionable) setRawPermissions
(long rawPermissions) setRawPosition
(int rawPosition) setTags
(DataObject tags) Methods inherited from interface net.dv8tion.jda.api.entities.detached.IDetachableEntity
isDetached
Methods inherited from interface net.dv8tion.jda.internal.entities.detached.mixin.IDetachableEntityMixin
checkAttached, detachedException, detachedRequiresChannelException
Methods inherited from interface net.dv8tion.jda.api.entities.IMentionable
formatTo, getAsMention
Methods inherited from interface net.dv8tion.jda.api.entities.IPermissionHolder
canSync, canSync, getPermissions, getPermissions, getPermissionsExplicit, getPermissionsExplicit, hasAccess, hasPermission, hasPermission, hasPermission, hasPermission
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
Methods inherited from interface net.dv8tion.jda.api.entities.Role
canInteract, createCopy, delete, getColor, getColorRaw, getGuild, getIcon, getJDA, getManager, getName, getPermissionsRaw, getPosition, getPositionRaw, getTags, isHoisted, isManaged, isMentionable, isPublicRole
-
Method Details
-
createCopy
Description copied from interface:Role
Creates a newRole
in the specifiedGuild
with the same settings as the givenRole
.
The position of the specified Role does not matter in this case!
If thisRole
has anIcon
set, only its emoji can be copied over.It will be placed at the bottom (just over the Public Role) to avoid permission hierarchy conflicts.
For this to be successful, the logged in account has to have theMANAGE_ROLES
Permission and allPermissions
the givenRole
has.Possible
ErrorResponses
caused by the returnedRestAction
include the following:MISSING_PERMISSIONS
The role could not be created due to a permission discrepancyMAX_ROLES_PER_GUILD
There are too many roles in this Guild
- Specified by:
createCopy
in interfaceRole
- Parameters:
guild
- TheRole
that should be copied- Returns:
RoleAction
RoleAction with already copied values from the specifiedRole
-
compareTo
- Specified by:
compareTo
in interfaceComparable<T extends RoleMixin<T>>
-
setName
-
setColor
-
setManaged
-
setHoisted
-
setMentionable
-
setRawPermissions
-
setRawPosition
-
setTags
-
setIcon
-