Package discord4j.core.spec
Class RoleEditSpec
- java.lang.Object
-
- discord4j.core.spec.RoleEditSpec
-
- All Implemented Interfaces:
AuditSpec<discord4j.discordjson.json.RoleModifyRequest>
,Spec<discord4j.discordjson.json.RoleModifyRequest>
public class RoleEditSpec extends Object implements AuditSpec<discord4j.discordjson.json.RoleModifyRequest>
Spec used to modify a guildRole
.- See Also:
- Modify Guild Role
-
-
Constructor Summary
Constructors Constructor Description RoleEditSpec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 theRole
.RoleEditSpec
setHoist(boolean hoist)
Sets whether the modifiedRole
should be displayed separately in the sidebar.RoleEditSpec
setMentionable(boolean mentionable)
Sets whether the modifiedRole
should be mentionable.RoleEditSpec
setName(String name)
Sets the new name of theRole
.RoleEditSpec
setPermissions(PermissionSet permissions)
Sets the new permissions for theRole
.RoleEditSpec
setReason(String reason)
Sets the reason to show in the audit logs when the spec is built.
-
-
-
Method Detail
-
setName
public RoleEditSpec setName(String name)
Sets the new name of theRole
.- Parameters:
name
- The role name.- Returns:
- This spec.
-
setPermissions
public RoleEditSpec setPermissions(PermissionSet permissions)
Sets the new permissions for theRole
.- Parameters:
permissions
- The role permissions.- Returns:
- This spec.
-
setColor
public RoleEditSpec setColor(Color color)
Sets the new color of theRole
.- Parameters:
color
- The role color.- Returns:
- This spec.
-
setHoist
public RoleEditSpec setHoist(boolean hoist)
Sets whether the modifiedRole
should be displayed separately in the sidebar.- Parameters:
hoist
- The role hoisted property.- Returns:
- This spec.
-
setMentionable
public RoleEditSpec setMentionable(boolean mentionable)
Sets whether the modifiedRole
should be mentionable.- Parameters:
mentionable
- The role mentionable property.- Returns:
- This spec.
-
setReason
public RoleEditSpec setReason(@Nullable String reason)
Description copied from interface:AuditSpec
Sets the reason to show in the audit logs when the spec is built.
-
getReason
@Nullable public String getReason()
Description copied from interface:AuditSpec
Returns the current audit log reason set on the spec.
-
-