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 guildNewsChannelsettings. 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.ChannelModifyRequestasRequest()StringgetReason()Returns the current audit log reason set on the spec.LegacyNewsChannelEditSpecsetName(String name)Sets the name of the modifiedNewsChannel.LegacyNewsChannelEditSpecsetNsfw(boolean nsfw)Sets whether the modifiedNewsChannelshould be NSFW (not safe for work).LegacyNewsChannelEditSpecsetParentId(Snowflake parentId)Sets the identifier of the parent category of the modifiedNewsChannel.LegacyNewsChannelEditSpecsetPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites)Sets the modifiedNewsChannelpermission overwrites.LegacyNewsChannelEditSpecsetPosition(int position)Sets the position of the modifiedNewsChannel.LegacyNewsChannelEditSpecsetReason(String reason)Sets the reason to show in the audit logs when the spec is built.LegacyNewsChannelEditSpecsetTopic(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 modifiedNewsChannelshould 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 modifiedNewsChannelpermission overwrites.- Parameters:
permissionOverwrites- The set ofPermissionOverwriteobjects.- 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:LegacyAuditSpecSets the reason to show in the audit logs when the spec is built.- Specified by:
setReasonin interfaceLegacyAuditSpec<discord4j.discordjson.json.ChannelModifyRequest>- Parameters:
reason- The audit log reason.- Returns:
- This spec.
-
getReason
@Nullable public String getReason()
Description copied from interface:LegacyAuditSpecReturns the current audit log reason set on the spec.- Specified by:
getReasonin interfaceLegacyAuditSpec<discord4j.discordjson.json.ChannelModifyRequest>- Returns:
- The current audit log reason.
-
asRequest
public discord4j.discordjson.json.ChannelModifyRequest asRequest()
- Specified by:
asRequestin interfaceLegacySpec<discord4j.discordjson.json.ChannelModifyRequest>
-
-