Package discord4j.core.spec
Class TextChannelEditSpec
- java.lang.Object
-
- discord4j.core.spec.TextChannelEditSpec
-
- All Implemented Interfaces:
AuditSpec<discord4j.discordjson.json.ChannelModifyRequest>
,Spec<discord4j.discordjson.json.ChannelModifyRequest>
public class TextChannelEditSpec extends Object implements AuditSpec<discord4j.discordjson.json.ChannelModifyRequest>
Spec used to modify a guildTextChannel
settings.- See Also:
- Modify Channel
-
-
Constructor Summary
Constructors Constructor Description TextChannelEditSpec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 modifiedTextChannel
.TextChannelEditSpec
setNsfw(boolean nsfw)
Sets whether the modifiedTextChannel
should be NSFW (not safe for work).TextChannelEditSpec
setParentId(Snowflake parentId)
Sets the identifier of the parent category of the modifiedTextChannel
.TextChannelEditSpec
setPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites)
Sets the modifiedTextChannel
permission overwrites.TextChannelEditSpec
setPosition(int position)
Sets the position of the modifiedTextChannel
.TextChannelEditSpec
setRateLimitPerUser(int rateLimitPerUser)
Sets the amount of seconds a user has to wait before sending another message to the modifiedTextChannel
, 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 modifiedTextChannel
.
-
-
-
Method Detail
-
setName
public TextChannelEditSpec setName(String name)
Sets the name of the modifiedTextChannel
.- Parameters:
name
- The channel name.- Returns:
- This spec.
-
setPosition
public TextChannelEditSpec setPosition(int position)
Sets the position of the modifiedTextChannel
.- Parameters:
position
- The channel position.- Returns:
- This spec.
-
setTopic
public TextChannelEditSpec setTopic(String topic)
Sets the topic of the modifiedTextChannel
.- Parameters:
topic
- The channel topic.- Returns:
- This spec.
-
setNsfw
public TextChannelEditSpec setNsfw(boolean nsfw)
Sets whether the modifiedTextChannel
should be NSFW (not safe for work).- Parameters:
nsfw
- The channel nsfw property.- Returns:
- This spec.
-
setPermissionOverwrites
public TextChannelEditSpec setPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites)
Sets the modifiedTextChannel
permission overwrites.- Parameters:
permissionOverwrites
- The set ofPermissionOverwrite
objects.- Returns:
- This spec.
-
setParentId
public TextChannelEditSpec setParentId(@Nullable Snowflake parentId)
Sets the identifier of the parent category of the modifiedTextChannel
.- Parameters:
parentId
- The parent category identifier.- Returns:
- This spec.
-
setRateLimitPerUser
public TextChannelEditSpec setRateLimitPerUser(int rateLimitPerUser)
Sets the amount of seconds a user has to wait before sending another message to the modifiedTextChannel
, from 0 to 21600 seconds. 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.
-
setReason
public TextChannelEditSpec setReason(@Nullable String reason)
Description copied from interface:AuditSpec
Sets the reason to show in the audit logs when the spec is built.
-
getReason
@Nullable public String getReason()
Description copied from interface:AuditSpec
Returns the current audit log reason set on the spec.
-
-