Package discord4j.core.spec
Class VoiceChannelEditSpec
- java.lang.Object
-
- discord4j.core.spec.VoiceChannelEditSpec
-
- All Implemented Interfaces:
AuditSpec<discord4j.discordjson.json.ChannelModifyRequest>
,Spec<discord4j.discordjson.json.ChannelModifyRequest>
public class VoiceChannelEditSpec extends Object implements AuditSpec<discord4j.discordjson.json.ChannelModifyRequest>
Spec used to modify aVoiceChannel
entity.- See Also:
- Modify Channel
-
-
Constructor Summary
Constructors Constructor Description VoiceChannelEditSpec()
-
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.VoiceChannelEditSpec
setBitrate(int bitrate)
Sets the bitrate for the modifiedVoiceChannel
.VoiceChannelEditSpec
setName(String name)
Sets the name for the modifiedVoiceChannel
.VoiceChannelEditSpec
setParentId(Snowflake parentId)
Sets the parent ID for the modifiedVoiceChannel
.VoiceChannelEditSpec
setPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites)
Sets the permission overwrites for the modifiedVoiceChannel
.VoiceChannelEditSpec
setPosition(int position)
Sets the position for the modifiedVoiceChannel
.VoiceChannelEditSpec
setReason(String reason)
Sets the reason to show in the audit logs when the spec is built.VoiceChannelEditSpec
setRtcRegion(String rtcRegion)
Sets the channel voice region id, automatic if null.VoiceChannelEditSpec
setUserLimit(int userLimit)
Sets the user limit for the modifiedVoiceChannel
.VoiceChannelEditSpec
setVideoQualityMode(VoiceChannel.Mode videoQualityMode)
Sets the camera video quality mode of the voice channel.
-
-
-
Method Detail
-
setName
public VoiceChannelEditSpec setName(String name)
Sets the name for the modifiedVoiceChannel
.- Parameters:
name
- The name of the voice channel.- Returns:
- This spec.
-
setPosition
public VoiceChannelEditSpec setPosition(int position)
Sets the position for the modifiedVoiceChannel
.- Parameters:
position
- The raw position for the channel.- Returns:
- This spec.
-
setPermissionOverwrites
public VoiceChannelEditSpec setPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites)
Sets the permission overwrites for the modifiedVoiceChannel
.- Parameters:
permissionOverwrites
- TheSet<PermissionOverwrite>
which contains overwrites for the channel.- Returns:
- This spec.
-
setParentId
public VoiceChannelEditSpec setParentId(@Nullable Snowflake parentId)
Sets the parent ID for the modifiedVoiceChannel
.The parent ID is equivalent to a
Category
ID.- Parameters:
parentId
- TheSnowflake
of the parentCategory
.- Returns:
- This spec.
-
setBitrate
public VoiceChannelEditSpec setBitrate(int bitrate)
Sets the bitrate for the modifiedVoiceChannel
.- Parameters:
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.- Returns:
- This spec.
-
setUserLimit
public VoiceChannelEditSpec setUserLimit(int userLimit)
Sets the user limit for the modifiedVoiceChannel
.Users with
Permission.MOVE_MEMBERS
ignore this limit and can also move other users into the channel past the limit.- Parameters:
userLimit
- The maximum number of users that can join the voice channel at once.- Returns:
- This spec.
-
setRtcRegion
public VoiceChannelEditSpec setRtcRegion(@Nullable String rtcRegion)
Sets the channel voice region id, automatic if null.- Parameters:
rtcRegion
- The channel voice region id, automatic if null.- Returns:
- This spec.
-
setVideoQualityMode
public VoiceChannelEditSpec setVideoQualityMode(VoiceChannel.Mode videoQualityMode)
Sets the camera video quality mode of the voice channel.- Parameters:
videoQualityMode
- The camera video quality mode of the voice channel.- Returns:
- This spec.
-
setReason
public VoiceChannelEditSpec 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.
-
-