All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.dv8tion.jda.api.managers.channel.middleman.AudioChannelManager Maven / Gradle / Ivy

Go to download

Java wrapper for the popular chat & VOIP service: Discord https://discord.com

The newest version!
/*
 * Copyright 2015 Austin Keener, Michael Ritter, Florian Spieß, and the JDA contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package net.dv8tion.jda.api.managers.channel.middleman;

import net.dv8tion.jda.api.Region;
import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.channel.concrete.StageChannel;
import net.dv8tion.jda.api.entities.channel.concrete.VoiceChannel;
import net.dv8tion.jda.api.entities.channel.middleman.AudioChannel;

import javax.annotation.CheckReturnValue;
import javax.annotation.Nonnull;

/**
 * Manager providing functionality common for all {@link net.dv8tion.jda.api.entities.channel.middleman.AudioChannel AudioChannels}.
 *
 * 

Example *

{@code
 * manager.setBitrate(48000)
 *        .setRegion(Region.AUTOMATIC)
 *        .queue();
 * manager.reset(ChannelManager.REGION | ChannelManager.BITRATE)
 *        .setRegion(Region.BRAZIL)
 *        .queue();
 * }
* * @param The channel type * @param The manager type * * @see net.dv8tion.jda.api.entities.channel.middleman.AudioChannel#getManager() */ public interface AudioChannelManager> extends StandardGuildChannelManager { /** * Sets the bitrate of the selected {@link AudioChannel}. *
The default value is {@code 64000} * *

A channel bitrate must not be less than {@code 8000} nor greater than {@link Guild#getMaxBitrate()}! *
This is only available to {@link AudioChannel AudioChannels} * * @param bitrate * The new bitrate for the selected {@link AudioChannel} * * @throws IllegalStateException * If the selected channel is not an {@link AudioChannel} * @throws IllegalArgumentException * If the provided bitrate is less than 8000 or greater than {@link Guild#getMaxBitrate()}. * * @return ChannelManager for chaining convenience * * @see Guild#getFeatures() */ @Nonnull @CheckReturnValue M setBitrate(int bitrate); /** * Sets the user-limit of the selected {@link AudioChannel}. *
Provide {@code 0} to reset the user-limit of the {@link AudioChannel} * *

A channel user-limit must not be negative nor greater than {@value VoiceChannel#MAX_USERLIMIT} for {@link VoiceChannel} * and not greater than {@value StageChannel#MAX_USERLIMIT} for {@link StageChannel}! *
This is only available to {@link AudioChannel AudioChannels} * * @param userLimit * The new user-limit for the selected {@link AudioChannel} * * @throws IllegalStateException * If the selected channel is not an {@link AudioChannel} * @throws IllegalArgumentException * If the provided user-limit is negative or greater than the permitted maximum * * @return ChannelManager for chaining convenience */ @Nonnull @CheckReturnValue M setUserLimit(int userLimit); /** * Sets the {@link Region Region} of the selected {@link AudioChannel}. *
The default value is {@link Region#AUTOMATIC} * * Possible values are: *

    *
  • {@link Region#AUTOMATIC}
  • *
  • {@link Region#US_WEST}
  • *
  • {@link Region#US_EAST}
  • *
  • {@link Region#US_CENTRAL}
  • *
  • {@link Region#US_SOUTH}
  • *
  • {@link Region#SINGAPORE}
  • *
  • {@link Region#SOUTH_AFRICA}
  • *
  • {@link Region#SYDNEY}
  • *
  • {@link Region#INDIA}
  • *
  • {@link Region#SOUTH_KOREA}
  • *
  • {@link Region#BRAZIL}
  • *
  • {@link Region#JAPAN}
  • *
  • {@link Region#RUSSIA}
  • *
* *
This is only available to {@link AudioChannel AudioChannels}! * * @param region * The new {@link Region Region} * * @throws IllegalStateException * If the selected channel is not an {@link AudioChannel} * @throws IllegalArgumentException * If the provided Region is not in the list of usable values * * @return ChannelManager for chaining convenience */ @Nonnull @CheckReturnValue M setRegion(@Nonnull Region region); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy