public class TextChannelCreateSpec extends Object implements AuditSpec<discord4j.discordjson.json.ChannelCreateRequest>
TextChannel
entities.Constructor and Description |
---|
TextChannelCreateSpec() |
Modifier and Type | Method and Description |
---|---|
discord4j.discordjson.json.ChannelCreateRequest |
asRequest() |
String |
getReason()
Returns the current audit log reason set on the spec.
|
TextChannelCreateSpec |
setName(String name)
Sets the name of the created
TextChannel . |
TextChannelCreateSpec |
setNsfw(boolean nsfw)
Sets whether the created
TextChannel is NSFW (not safe for work). |
TextChannelCreateSpec |
setParentId(Snowflake parentId)
Sets the identifier of the parent category of the created
TextChannel . |
TextChannelCreateSpec |
setPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites)
Sets the created
TextChannel permission overwrites. |
TextChannelCreateSpec |
setPosition(int position)
Sets the sorting position of the created
TextChannel . |
TextChannelCreateSpec |
setRateLimitPerUser(int rateLimitPerUser)
Sets the amount of seconds a user has to wait before sending another message to the created
TextChannel , from 0 to 120. |
TextChannelCreateSpec |
setReason(String reason)
Sets the reason to show in the audit logs when the spec is built.
|
TextChannelCreateSpec |
setTopic(String topic)
Sets the created
TextChannel topic. |
public TextChannelCreateSpec setName(String name)
TextChannel
.name
- The channel name.public TextChannelCreateSpec setTopic(@Nullable String topic)
TextChannel
topic.topic
- The channel topic.public TextChannelCreateSpec setRateLimitPerUser(int rateLimitPerUser)
TextChannel
, from 0 to 120. Does not affect bots or users with Permission.MANAGE_MESSAGES
or
Permission.MANAGE_CHANNELS
permissions.rateLimitPerUser
- The channel user rate limit, in seconds.public TextChannelCreateSpec setPosition(int position)
TextChannel
.position
- The channel position.public TextChannelCreateSpec setPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites)
TextChannel
permission overwrites.permissionOverwrites
- The set of PermissionOverwrite
objects.public TextChannelCreateSpec setParentId(@Nullable Snowflake parentId)
TextChannel
.parentId
- The parent category identifier.public TextChannelCreateSpec setNsfw(boolean nsfw)
TextChannel
is NSFW (not safe for work).nsfw
- The channel nsfw property.public TextChannelCreateSpec setReason(@Nullable String reason)
AuditSpec
@Nullable public String getReason()
AuditSpec