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