Package discord4j.core.spec.legacy
Class LegacyTextChannelCreateSpec
java.lang.Object
discord4j.core.spec.legacy.LegacyTextChannelCreateSpec
- All Implemented Interfaces:
LegacyAuditSpec<discord4j.discordjson.json.ChannelCreateRequest>
,LegacySpec<discord4j.discordjson.json.ChannelCreateRequest>
public class LegacyTextChannelCreateSpec
extends Object
implements LegacyAuditSpec<discord4j.discordjson.json.ChannelCreateRequest>
LegacySpec used to create guild
TextChannel
entities.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondiscord4j.discordjson.json.ChannelCreateRequest
Returns the current audit log reason set on the spec.Sets the name of the createdTextChannel
.setNsfw
(boolean nsfw) Sets whether the createdTextChannel
is NSFW (not safe for work).setParentId
(Snowflake parentId) Sets the identifier of the parent category of the createdTextChannel
.setPermissionOverwrites
(Set<? extends PermissionOverwrite> permissionOverwrites) Sets the createdTextChannel
permission overwrites.setPosition
(int position) Sets the sorting position of the createdTextChannel
.setRateLimitPerUser
(int rateLimitPerUser) Sets the amount of seconds a user has to wait before sending another message to the createdTextChannel
, from 0 to 21600.Sets the reason to show in the audit logs when the spec is built.Sets the createdTextChannel
topic.
-
Constructor Details
-
LegacyTextChannelCreateSpec
public LegacyTextChannelCreateSpec()
-
-
Method Details
-
setName
Sets the name of the createdTextChannel
.- Parameters:
name
- The channel name.- Returns:
- This spec.
-
setTopic
Sets the createdTextChannel
topic.- Parameters:
topic
- The channel topic.- Returns:
- This spec.
-
setRateLimitPerUser
Sets the amount of seconds a user has to wait before sending another message to the createdTextChannel
, from 0 to 21600. Does not affect bots or users withPermission.MANAGE_MESSAGES
orPermission.MANAGE_CHANNELS
permissions.- Parameters:
rateLimitPerUser
- The channel user rate limit, in seconds.- Returns:
- This spec.
-
setPosition
Sets the sorting position of the createdTextChannel
.- Parameters:
position
- The channel position.- Returns:
- This spec.
-
setPermissionOverwrites
public LegacyTextChannelCreateSpec setPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites) Sets the createdTextChannel
permission overwrites.- Parameters:
permissionOverwrites
- The set ofPermissionOverwrite
objects.- Returns:
- This spec.
-
setParentId
Sets the identifier of the parent category of the createdTextChannel
.- Parameters:
parentId
- The parent category identifier.- Returns:
- This spec.
-
setNsfw
Sets whether the createdTextChannel
is NSFW (not safe for work).- Parameters:
nsfw
- The channel nsfw property.- Returns:
- This spec.
-
setReason
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.ChannelCreateRequest>
- Parameters:
reason
- The audit log reason.- Returns:
- This spec.
-
getReason
Description copied from interface:LegacyAuditSpec
Returns the current audit log reason set on the spec.- Specified by:
getReason
in interfaceLegacyAuditSpec<discord4j.discordjson.json.ChannelCreateRequest>
- Returns:
- The current audit log reason.
-
asRequest
public discord4j.discordjson.json.ChannelCreateRequest asRequest()- Specified by:
asRequest
in interfaceLegacySpec<discord4j.discordjson.json.ChannelCreateRequest>
-