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