Package discord4j.core.spec.legacy
Class LegacyCategoryCreateSpec
- java.lang.Object
-
- discord4j.core.spec.legacy.LegacyCategoryCreateSpec
-
- All Implemented Interfaces:
LegacyAuditSpec<discord4j.discordjson.json.ChannelCreateRequest>
,LegacySpec<discord4j.discordjson.json.ChannelCreateRequest>
public class LegacyCategoryCreateSpec extends Object implements LegacyAuditSpec<discord4j.discordjson.json.ChannelCreateRequest>
A spec used to configure and create aCategory
.
-
-
Constructor Summary
Constructors Constructor Description LegacyCategoryCreateSpec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description discord4j.discordjson.json.ChannelCreateRequest
asRequest()
String
getReason()
Returns the current audit log reason set on the spec.LegacyCategoryCreateSpec
setName(String name)
Sets the name for the createdCategory
.LegacyCategoryCreateSpec
setPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites)
Sets the permission overwrites for the createdCategory
.LegacyCategoryCreateSpec
setPosition(int position)
Sets the position for the createdCategory
.LegacyCategoryCreateSpec
setReason(String reason)
Sets the reason to show in the audit logs when the spec is built.
-
-
-
Method Detail
-
setName
public LegacyCategoryCreateSpec setName(String name)
Sets the name for the createdCategory
.- Parameters:
name
- The name of the category.- Returns:
- This spec.
-
setPosition
public LegacyCategoryCreateSpec setPosition(int position)
Sets the position for the createdCategory
.- Parameters:
position
- The raw position for the category.- Returns:
- This spec.
-
setPermissionOverwrites
public LegacyCategoryCreateSpec setPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites)
Sets the permission overwrites for the createdCategory
.- Parameters:
permissionOverwrites
- TheSet<PermissionOverwrite>
which contains overwrites for the category.- Returns:
- This spec.
-
setReason
public LegacyCategoryCreateSpec setReason(@Nullable String reason)
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.ChannelCreateRequest>
- Parameters:
reason
- The audit log reason.- Returns:
- This spec.
-
getReason
@Nullable public String getReason()
Description copied from interface:LegacyAuditSpec
Returns the current audit log reason set on the spec.- Specified by:
getReason
in interfaceLegacyAuditSpec<discord4j.discordjson.json.ChannelCreateRequest>
- Returns:
- The current audit log reason.
-
asRequest
public discord4j.discordjson.json.ChannelCreateRequest asRequest()
- Specified by:
asRequest
in interfaceLegacySpec<discord4j.discordjson.json.ChannelCreateRequest>
-
-