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