public class VoiceChannelEditSpec extends Object implements AuditSpec<ChannelModifyRequest>
VoiceChannel
entity.Constructor and Description |
---|
VoiceChannelEditSpec() |
Modifier and Type | Method and Description |
---|---|
ChannelModifyRequest |
asRequest() |
String |
getReason()
Returns the current audit log reason set on the spec.
|
VoiceChannelEditSpec |
setBitrate(int bitrate)
Sets the bitrate for the modified
VoiceChannel . |
VoiceChannelEditSpec |
setName(String name)
Sets the name for the modified
VoiceChannel . |
VoiceChannelEditSpec |
setParentId(Snowflake parentId)
Sets the parent ID for the modified
VoiceChannel . |
VoiceChannelEditSpec |
setPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites)
Sets the permission overwrites for the modified
VoiceChannel . |
VoiceChannelEditSpec |
setPosition(int position)
Sets the position for the modified
VoiceChannel . |
VoiceChannelEditSpec |
setReason(String reason)
Sets the reason to show in the audit logs when the spec is built.
|
VoiceChannelEditSpec |
setUserLimit(int userLimit)
Sets the user limit for the modified
VoiceChannel . |
public VoiceChannelEditSpec setName(String name)
VoiceChannel
.name
- The name of the voice channel.public VoiceChannelEditSpec setPosition(int position)
VoiceChannel
.position
- The raw position for the channel.public VoiceChannelEditSpec setPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites)
VoiceChannel
.permissionOverwrites
- The Set<PermissionOverwrite>
which contains overwrites for the channel.public VoiceChannelEditSpec setParentId(@Nullable Snowflake parentId)
VoiceChannel
.
The parent ID is equivalent to a Category
ID.
parentId
- The Snowflake
of the parent Category
.public VoiceChannelEditSpec setBitrate(int bitrate)
VoiceChannel
.bitrate
- The maximum amount of bits to send per second in the voice channel, related to the quality of
audio. A valid bitrate is a number from 8 to 96.public VoiceChannelEditSpec setUserLimit(int userLimit)
VoiceChannel
.
Users with Permission.MOVE_MEMBERS
ignore this limit and can also move other users into the channel
past the limit.
userLimit
- The maximum number of users that can join the voice channel at once.public VoiceChannelEditSpec setReason(@Nullable String reason)
AuditSpec
setReason
in interface AuditSpec<ChannelModifyRequest>
reason
- The audit log reason.@Nullable public String getReason()
AuditSpec
getReason
in interface AuditSpec<ChannelModifyRequest>
public ChannelModifyRequest asRequest()
asRequest
in interface Spec<ChannelModifyRequest>