Class LegacyVoiceChannelEditSpec

java.lang.Object
discord4j.core.spec.legacy.LegacyVoiceChannelEditSpec
All Implemented Interfaces:
LegacyAuditSpec<discord4j.discordjson.json.ChannelModifyRequest>, LegacySpec<discord4j.discordjson.json.ChannelModifyRequest>

public class LegacyVoiceChannelEditSpec extends Object implements LegacyAuditSpec<discord4j.discordjson.json.ChannelModifyRequest>
LegacySpec used to modify a VoiceChannel entity.
See Also:
  • Constructor Details

    • LegacyVoiceChannelEditSpec

      public LegacyVoiceChannelEditSpec()
  • Method Details

    • setUserLimit

      public LegacyVoiceChannelEditSpec setUserLimit(int userLimit)
      Sets the user limit for the modified VoiceChannel.

      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.
    • setVideoQualityMode

      public LegacyVoiceChannelEditSpec 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.
    • setName

      public LegacyVoiceChannelEditSpec setName(String name)
      Sets the name for the modified VoiceChannel.
      Parameters:
      name - The name of the voice channel.
      Returns:
      This spec.
    • setPosition

      public LegacyVoiceChannelEditSpec setPosition(int position)
      Sets the position for the modified VoiceChannel.
      Parameters:
      position - The raw position for the channel.
      Returns:
      This spec.
    • setPermissionOverwrites

      public LegacyVoiceChannelEditSpec setPermissionOverwrites(Set<? extends PermissionOverwrite> permissionOverwrites)
      Sets the permission overwrites for the modified VoiceChannel.
      Parameters:
      permissionOverwrites - The Set<PermissionOverwrite> which contains overwrites for the channel.
      Returns:
      This spec.
    • setParentId

      public LegacyVoiceChannelEditSpec setParentId(@Nullable Snowflake parentId)
      Sets the parent ID for the modified VoiceChannel.

      The parent ID is equivalent to a Category ID.

      Parameters:
      parentId - The Snowflake of the parent Category.
      Returns:
      This spec.
    • setBitrate

      public LegacyVoiceChannelEditSpec setBitrate(int bitrate)
      Sets the bitrate for the modified VoiceChannel.
      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.
    • setRtcRegion

      public LegacyVoiceChannelEditSpec 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.
    • setReason

      public LegacyVoiceChannelEditSpec setReason(@Nullable String reason)
      Description copied from interface: LegacyAuditSpec
      Sets the reason to show in the audit logs when the spec is built.
      Specified by:
      setReason in interface LegacyAuditSpec<discord4j.discordjson.json.ChannelModifyRequest>
      Parameters:
      reason - The audit log reason.
      Returns:
      This spec.
    • getReason

      @Nullable public String getReason()
      Description copied from interface: LegacyAuditSpec
      Returns the current audit log reason set on the spec.
      Specified by:
      getReason in interface LegacyAuditSpec<discord4j.discordjson.json.ChannelModifyRequest>
      Returns:
      The current audit log reason.
    • asRequest

      public discord4j.discordjson.json.ChannelModifyRequest asRequest()
      Specified by:
      asRequest in interface LegacySpec<discord4j.discordjson.json.ChannelModifyRequest>