Package discord4j.core.spec.legacy
Class LegacyRoleEditSpec
java.lang.Object
discord4j.core.spec.legacy.LegacyRoleEditSpec
- All Implemented Interfaces:
LegacyAuditSpec<discord4j.discordjson.json.RoleModifyRequest>
,LegacySpec<discord4j.discordjson.json.RoleModifyRequest>
public class LegacyRoleEditSpec
extends Object
implements LegacyAuditSpec<discord4j.discordjson.json.RoleModifyRequest>
LegacySpec used to modify a guild
Role
.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondiscord4j.discordjson.json.RoleModifyRequest
Returns the current audit log reason set on the spec.Sets the new color of theRole
.setHoist
(boolean hoist) Sets whether the modifiedRole
should be displayed separately in the sidebar.setMentionable
(boolean mentionable) Sets whether the modifiedRole
should be mentionable.Sets the new name of theRole
.setPermissions
(PermissionSet permissions) Sets the new permissions for theRole
.Sets the reason to show in the audit logs when the spec is built.
-
Constructor Details
-
LegacyRoleEditSpec
public LegacyRoleEditSpec()
-
-
Method Details
-
setName
Sets the new name of theRole
.- Parameters:
name
- The role name.- Returns:
- This spec.
-
setPermissions
Sets the new permissions for theRole
.- Parameters:
permissions
- The role permissions.- Returns:
- This spec.
-
setColor
Sets the new color of theRole
.- Parameters:
color
- The role color.- Returns:
- This spec.
-
setHoist
Sets whether the modifiedRole
should be displayed separately in the sidebar.- Parameters:
hoist
- The role hoisted property.- Returns:
- This spec.
-
setMentionable
Sets whether the modifiedRole
should be mentionable.- Parameters:
mentionable
- The role mentionable property.- Returns:
- This spec.
-
setReason
Description copied from interface:LegacyAuditSpec
Sets the reason to show in the audit logs when the spec is built.- Specified by:
setReason
in interfaceLegacyAuditSpec<discord4j.discordjson.json.RoleModifyRequest>
- Parameters:
reason
- The audit log reason.- Returns:
- This spec.
-
getReason
Description copied from interface:LegacyAuditSpec
Returns the current audit log reason set on the spec.- Specified by:
getReason
in interfaceLegacyAuditSpec<discord4j.discordjson.json.RoleModifyRequest>
- Returns:
- The current audit log reason.
-
asRequest
public discord4j.discordjson.json.RoleModifyRequest asRequest()- Specified by:
asRequest
in interfaceLegacySpec<discord4j.discordjson.json.RoleModifyRequest>
-