public class NewsChannelCreateSpec extends Object implements AuditSpec<ChannelCreateRequest>
NewsChannel
entities.Constructor and Description |
---|
NewsChannelCreateSpec() |
Modifier and Type | Method and Description |
---|---|
ChannelCreateRequest |
asRequest() |
String |
getReason()
Returns the current audit log reason set on the spec.
|
NewsChannelCreateSpec |
setName(String name)
Sets the name of the created
NewsChannel . |
NewsChannelCreateSpec |
setNsfw(boolean nsfw)
Sets whether the created
NewsChannel is NSFW (not safe for work). |
NewsChannelCreateSpec |
setParentId(Snowflake parentId)
Sets the identifier of the parent category of the created
NewsChannel . |
NewsChannelCreateSpec |
setPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites)
Sets the created
NewsChannel permission overwrites. |
NewsChannelCreateSpec |
setPosition(int position)
Sets the sorting position of the created
NewsChannel . |
NewsChannelCreateSpec |
setReason(String reason)
Sets the reason to show in the audit logs when the spec is built.
|
NewsChannelCreateSpec |
setTopic(String topic)
Sets the created
NewsChannel topic. |
public NewsChannelCreateSpec setName(String name)
NewsChannel
.name
- The channel name.public NewsChannelCreateSpec setTopic(@Nullable String topic)
NewsChannel
topic.topic
- The channel topic.public NewsChannelCreateSpec setPosition(int position)
NewsChannel
.position
- The channel position.public NewsChannelCreateSpec setPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites)
NewsChannel
permission overwrites.permissionOverwrites
- The set of PermissionOverwrite
objects.public NewsChannelCreateSpec setParentId(@Nullable Snowflake parentId)
NewsChannel
.parentId
- The parent category identifier.public NewsChannelCreateSpec setNsfw(boolean nsfw)
NewsChannel
is NSFW (not safe for work).nsfw
- The channel nsfw property.public NewsChannelCreateSpec setReason(@Nullable String reason)
AuditSpec
setReason
in interface AuditSpec<ChannelCreateRequest>
reason
- The audit log reason.@Nullable public String getReason()
AuditSpec
getReason
in interface AuditSpec<ChannelCreateRequest>
public ChannelCreateRequest asRequest()
asRequest
in interface Spec<ChannelCreateRequest>