Package discord4j.core.spec
Class NewsChannelCreateSpec
- java.lang.Object
-
- discord4j.core.spec.NewsChannelCreateSpec
-
- All Implemented Interfaces:
AuditSpec<discord4j.discordjson.json.ChannelCreateRequest>
,Spec<discord4j.discordjson.json.ChannelCreateRequest>
public class NewsChannelCreateSpec extends Object implements AuditSpec<discord4j.discordjson.json.ChannelCreateRequest>
Spec used to create guildNewsChannel
entities.- See Also:
- Create Guild Channel
-
-
Constructor Summary
Constructors Constructor Description NewsChannelCreateSpec()
-
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.NewsChannelCreateSpec
setName(String name)
Sets the name of the createdNewsChannel
.NewsChannelCreateSpec
setNsfw(boolean nsfw)
Sets whether the createdNewsChannel
is NSFW (not safe for work).NewsChannelCreateSpec
setParentId(Snowflake parentId)
Sets the identifier of the parent category of the createdNewsChannel
.NewsChannelCreateSpec
setPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites)
Sets the createdNewsChannel
permission overwrites.NewsChannelCreateSpec
setPosition(int position)
Sets the sorting position of the createdNewsChannel
.NewsChannelCreateSpec
setReason(String reason)
Sets the reason to show in the audit logs when the spec is built.NewsChannelCreateSpec
setTopic(String topic)
Sets the createdNewsChannel
topic.
-
-
-
Method Detail
-
setName
public NewsChannelCreateSpec setName(String name)
Sets the name of the createdNewsChannel
.- Parameters:
name
- The channel name.- Returns:
- This spec.
-
setTopic
public NewsChannelCreateSpec setTopic(String topic)
Sets the createdNewsChannel
topic.- Parameters:
topic
- The channel topic.- Returns:
- This spec.
-
setPosition
public NewsChannelCreateSpec setPosition(int position)
Sets the sorting position of the createdNewsChannel
.- Parameters:
position
- The channel position.- Returns:
- This spec.
-
setPermissionOverwrites
public NewsChannelCreateSpec setPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites)
Sets the createdNewsChannel
permission overwrites.- Parameters:
permissionOverwrites
- The set ofPermissionOverwrite
objects.- Returns:
- This spec.
-
setParentId
public NewsChannelCreateSpec setParentId(@Nullable Snowflake parentId)
Sets the identifier of the parent category of the createdNewsChannel
.- Parameters:
parentId
- The parent category identifier.- Returns:
- This spec.
-
setNsfw
public NewsChannelCreateSpec setNsfw(boolean nsfw)
Sets whether the createdNewsChannel
is NSFW (not safe for work).- Parameters:
nsfw
- The channel nsfw property.- Returns:
- This spec.
-
setReason
public NewsChannelCreateSpec 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.
-
-