Package discord4j.core.spec.legacy
Class LegacyNewsChannelCreateSpec
- java.lang.Object
-
- discord4j.core.spec.legacy.LegacyNewsChannelCreateSpec
-
- All Implemented Interfaces:
LegacyAuditSpec<discord4j.discordjson.json.ChannelCreateRequest>,LegacySpec<discord4j.discordjson.json.ChannelCreateRequest>
public class LegacyNewsChannelCreateSpec extends Object implements LegacyAuditSpec<discord4j.discordjson.json.ChannelCreateRequest>
LegacySpec used to create guildNewsChannelentities.- See Also:
- Create Guild Channel
-
-
Constructor Summary
Constructors Constructor Description LegacyNewsChannelCreateSpec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description discord4j.discordjson.json.ChannelCreateRequestasRequest()StringgetReason()Returns the current audit log reason set on the spec.LegacyNewsChannelCreateSpecsetName(String name)Sets the name of the createdNewsChannel.LegacyNewsChannelCreateSpecsetNsfw(boolean nsfw)Sets whether the createdNewsChannelis NSFW (not safe for work).LegacyNewsChannelCreateSpecsetParentId(Snowflake parentId)Sets the identifier of the parent category of the createdNewsChannel.LegacyNewsChannelCreateSpecsetPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites)Sets the createdNewsChannelpermission overwrites.LegacyNewsChannelCreateSpecsetPosition(int position)Sets the sorting position of the createdNewsChannel.LegacyNewsChannelCreateSpecsetReason(String reason)Sets the reason to show in the audit logs when the spec is built.LegacyNewsChannelCreateSpecsetTopic(String topic)Sets the createdNewsChanneltopic.
-
-
-
Method Detail
-
setName
public LegacyNewsChannelCreateSpec setName(String name)
Sets the name of the createdNewsChannel.- Parameters:
name- The channel name.- Returns:
- This spec.
-
setTopic
public LegacyNewsChannelCreateSpec setTopic(String topic)
Sets the createdNewsChanneltopic.- Parameters:
topic- The channel topic.- Returns:
- This spec.
-
setPosition
public LegacyNewsChannelCreateSpec setPosition(int position)
Sets the sorting position of the createdNewsChannel.- Parameters:
position- The channel position.- Returns:
- This spec.
-
setPermissionOverwrites
public LegacyNewsChannelCreateSpec setPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites)
Sets the createdNewsChannelpermission overwrites.- Parameters:
permissionOverwrites- The set ofPermissionOverwriteobjects.- Returns:
- This spec.
-
setParentId
public LegacyNewsChannelCreateSpec 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 LegacyNewsChannelCreateSpec setNsfw(boolean nsfw)
Sets whether the createdNewsChannelis NSFW (not safe for work).- Parameters:
nsfw- The channel nsfw property.- Returns:
- This spec.
-
setReason
public LegacyNewsChannelCreateSpec 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.ChannelCreateRequest>- 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.ChannelCreateRequest>- Returns:
- The current audit log reason.
-
asRequest
public discord4j.discordjson.json.ChannelCreateRequest asRequest()
- Specified by:
asRequestin interfaceLegacySpec<discord4j.discordjson.json.ChannelCreateRequest>
-
-