Interface RoleMixin<T extends RoleMixin<T>>

All Superinterfaces:
Comparable<Role>, Formattable, IDetachableEntity, IDetachableEntityMixin, IMentionable, IPermissionHolder, ISnowflake, Role
All Known Implementing Classes:
DetachedRoleImpl, RoleImpl

public interface RoleMixin<T extends RoleMixin<T>> extends Role, IDetachableEntityMixin
  • Method Details

    • createCopy

      @Nonnull default RoleAction createCopy(@Nonnull Guild guild)
      Description copied from interface: Role
      Creates a new Role in the specified Guild with the same settings as the given Role.
      The position of the specified Role does not matter in this case!
      If this Role has an Icon 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 the MANAGE_ROLES Permission and all Permissions the given Role has.

      Possible ErrorResponses caused by the returned RestAction include the following:

      Specified by:
      createCopy in interface Role
      Parameters:
      guild - The Role that should be copied
      Returns:
      RoleAction
      RoleAction with already copied values from the specified Role
    • compareTo

      default int compareTo(@Nonnull Role r)
      Specified by:
      compareTo in interface Comparable<T extends RoleMixin<T>>
    • setName

      T setName(String name)
    • setColor

      T setColor(int color)
    • setManaged

      T setManaged(boolean managed)
    • setHoisted

      T setHoisted(boolean hoisted)
    • setMentionable

      T setMentionable(boolean mentionable)
    • setRawPermissions

      T setRawPermissions(long rawPermissions)
    • setRawPosition

      T setRawPosition(int rawPosition)
    • setTags

      T setTags(DataObject tags)
    • setIcon

      T setIcon(RoleIcon icon)