public class RoleEditSpec extends Object implements AuditSpec<discord4j.discordjson.json.RoleModifyRequest>
Role
.Constructor and Description |
---|
RoleEditSpec() |
Modifier and Type | Method and Description |
---|---|
discord4j.discordjson.json.RoleModifyRequest |
asRequest() |
String |
getReason()
Returns the current audit log reason set on the spec.
|
RoleEditSpec |
setColor(Color color)
Sets the new color of the
Role . |
RoleEditSpec |
setHoist(boolean hoist)
Sets whether the modified
Role should be displayed separately in the sidebar. |
RoleEditSpec |
setMentionable(boolean mentionable)
Sets whether the modified
Role should be mentionable. |
RoleEditSpec |
setName(String name)
Sets the new name of the
Role . |
RoleEditSpec |
setPermissions(PermissionSet permissions)
Sets the new permissions for the
Role . |
RoleEditSpec |
setReason(String reason)
Sets the reason to show in the audit logs when the spec is built.
|
public RoleEditSpec setName(String name)
Role
.name
- The role name.public RoleEditSpec setPermissions(PermissionSet permissions)
Role
.permissions
- The role permissions.public RoleEditSpec setColor(Color color)
Role
.color
- The role color.public RoleEditSpec setHoist(boolean hoist)
Role
should be displayed separately in the sidebar.hoist
- The role hoisted property.public RoleEditSpec setMentionable(boolean mentionable)
Role
should be mentionable.mentionable
- The role mentionable property.public RoleEditSpec setReason(@Nullable String reason)
AuditSpec
@Nullable public String getReason()
AuditSpec