Package discord4j.core.spec
Class NewsChannelEditSpec
- java.lang.Object
-
- discord4j.core.spec.NewsChannelEditSpec
-
- All Implemented Interfaces:
AuditSpec<discord4j.discordjson.json.ChannelModifyRequest>
,Spec<discord4j.discordjson.json.ChannelModifyRequest>
public class NewsChannelEditSpec extends Object implements AuditSpec<discord4j.discordjson.json.ChannelModifyRequest>
Spec used to modify a guildNewsChannel
settings. G- See Also:
- Modify Channel
-
-
Constructor Summary
Constructors Constructor Description NewsChannelEditSpec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description discord4j.discordjson.json.ChannelModifyRequest
asRequest()
String
getReason()
Returns the current audit log reason set on the spec.NewsChannelEditSpec
setName(String name)
Sets the name of the modifiedNewsChannel
.NewsChannelEditSpec
setNsfw(boolean nsfw)
Sets whether the modifiedNewsChannel
should be NSFW (not safe for work).NewsChannelEditSpec
setParentId(Snowflake parentId)
Sets the identifier of the parent category of the modifiedNewsChannel
.NewsChannelEditSpec
setPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites)
Sets the modifiedNewsChannel
permission overwrites.NewsChannelEditSpec
setPosition(int position)
Sets the position of the modifiedNewsChannel
.NewsChannelEditSpec
setReason(String reason)
Sets the reason to show in the audit logs when the spec is built.NewsChannelEditSpec
setTopic(String topic)
Sets the topic of the modifiedNewsChannel
.
-
-
-
Method Detail
-
setName
public NewsChannelEditSpec setName(String name)
Sets the name of the modifiedNewsChannel
.- Parameters:
name
- The channel name.- Returns:
- This spec.
-
setPosition
public NewsChannelEditSpec setPosition(int position)
Sets the position of the modifiedNewsChannel
.- Parameters:
position
- The channel position.- Returns:
- This spec.
-
setTopic
public NewsChannelEditSpec setTopic(String topic)
Sets the topic of the modifiedNewsChannel
.- Parameters:
topic
- The channel topic.- Returns:
- This spec.
-
setNsfw
public NewsChannelEditSpec setNsfw(boolean nsfw)
Sets whether the modifiedNewsChannel
should be NSFW (not safe for work).- Parameters:
nsfw
- The channel nsfw property.- Returns:
- This spec.
-
setPermissionOverwrites
public NewsChannelEditSpec setPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites)
Sets the modifiedNewsChannel
permission overwrites.- Parameters:
permissionOverwrites
- The set ofPermissionOverwrite
objects.- Returns:
- This spec.
-
setParentId
public NewsChannelEditSpec setParentId(@Nullable Snowflake parentId)
Sets the identifier of the parent category of the modifiedNewsChannel
.- Parameters:
parentId
- The parent category identifier.- Returns:
- This spec.
-
setReason
public NewsChannelEditSpec 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.
-
-