Package discord4j.core.spec
Class CategoryCreateSpec
- java.lang.Object
-
- discord4j.core.spec.CategoryCreateSpec
-
- All Implemented Interfaces:
AuditSpec<discord4j.discordjson.json.ChannelCreateRequest>
,Spec<discord4j.discordjson.json.ChannelCreateRequest>
public class CategoryCreateSpec extends Object implements AuditSpec<discord4j.discordjson.json.ChannelCreateRequest>
A spec used to configure and create aCategory
.
-
-
Constructor Summary
Constructors Constructor Description CategoryCreateSpec()
-
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.CategoryCreateSpec
setName(String name)
Sets the name for the createdCategory
.CategoryCreateSpec
setPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites)
Sets the permission overwrites for the createdCategory
.CategoryCreateSpec
setPosition(int position)
Sets the position for the createdCategory
.CategoryCreateSpec
setReason(String reason)
Sets the reason to show in the audit logs when the spec is built.
-
-
-
Method Detail
-
setName
public CategoryCreateSpec setName(String name)
Sets the name for the createdCategory
.- Parameters:
name
- The name of the category.- Returns:
- This spec.
-
setPosition
public CategoryCreateSpec setPosition(int position)
Sets the position for the createdCategory
.- Parameters:
position
- The raw position for the category.- Returns:
- This spec.
-
setPermissionOverwrites
public CategoryCreateSpec 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 CategoryCreateSpec 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.
-
-