Package net.dv8tion.jda.api.entities
Interface VoiceChannel
-
- All Superinterfaces:
AbstractChannel,java.lang.Comparable<GuildChannel>,java.util.Formattable,GuildChannel,IMentionable,ISnowflake
- All Known Subinterfaces:
StageChannel
public interface VoiceChannel extends GuildChannel
Represents a Discord Voice GuildChannel.
Adds additional information specific to voice channels in Discord.- See Also:
GuildChannel,TextChannel,Category,Guild.getVoiceChannelCache(),Guild.getVoiceChannels(),Guild.getVoiceChannelsByName(String, boolean),Guild.getVoiceChannelById(long),JDA.getVoiceChannelCache(),JDA.getVoiceChannels(),JDA.getVoiceChannelsByName(String, boolean),JDA.getVoiceChannelById(long)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ChannelAction<VoiceChannel>createCopy()Creates a copy of the specifiedGuildChannel.ChannelAction<VoiceChannel>createCopy(Guild guild)Creates a copy of the specifiedGuildChannelin the specifiedGuild.intgetBitrate()The audio bitrate of the voice audio that is transmitted in this channel.RegiongetRegion()TheRegionof thisVoiceChannel.java.lang.StringgetRegionRaw()The raw region name for thisVoiceChannel.intgetUserLimit()The maximum amount ofMembersthat can be in thisVoiceChannelat once.-
Methods inherited from interface net.dv8tion.jda.api.entities.AbstractChannel
getJDA, getName, getType
-
Methods inherited from interface net.dv8tion.jda.api.entities.GuildChannel
createInvite, createPermissionOverride, delete, getGuild, getManager, getMemberPermissionOverrides, getMembers, getParent, getPermissionOverride, getPermissionOverrides, getPosition, getPositionRaw, getRolePermissionOverrides, isSynced, putPermissionOverride, retrieveInvites, upsertPermissionOverride
-
Methods inherited from interface net.dv8tion.jda.api.entities.IMentionable
formatTo, getAsMention
-
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
-
-
-
Method Detail
-
getUserLimit
int getUserLimit()
The maximum amount ofMembersthat can be in thisVoiceChannelat once.
0 - No limitThis is meaningless for
StageChannels.- Returns:
- The maximum amount of members allowed in this channel at once.
-
getBitrate
int getBitrate()
The audio bitrate of the voice audio that is transmitted in this channel. While higher bitrates can be sent to this channel, it will be scaled down by the client.
Default and recommended value is 64000- Returns:
- The audio bitrate of this voice channel.
-
getRegion
@Nonnull Region getRegion()
TheRegionof thisVoiceChannel.
This will returnRegion.AUTOMATICif the region of this channel is set to Automatic.- Returns:
- the
Regionof this channel.
-
getRegionRaw
@Nullable java.lang.String getRegionRaw()
The raw region name for thisVoiceChannel. This will return null if the region is set to Automatic.- Returns:
- Raw region name
-
createCopy
@Nonnull ChannelAction<VoiceChannel> createCopy(@Nonnull Guild guild)
Description copied from interface:GuildChannelCreates a copy of the specifiedGuildChannelin the specifiedGuild.
If the provided target guild is not the same Guild this channel is in then the parent category and permissions will not be copied due to technical difficulty and ambiguity.This copies the following elements:
- Name
- Parent Category (if present)
- Voice Elements (Bitrate, Userlimit)
- Text Elements (Topic, NSFW, Slowmode)
- All permission overrides for Members/Roles
Possible
ErrorResponsescaused by the returnedRestActioninclude the following:MISSING_PERMISSIONS
The channel could not be created due to a permission discrepancyMISSING_ACCESS
TheVIEW_CHANNELpermission was removed
- Specified by:
createCopyin interfaceGuildChannel- Parameters:
guild- TheGuildto create the channel in- Returns:
- A specific
ChannelAction
This action allows to set fields for the new GuildChannel before creating it!
-
createCopy
@Nonnull ChannelAction<VoiceChannel> createCopy()
Description copied from interface:GuildChannelCreates a copy of the specifiedGuildChannel.This copies the following elements:
- Name
- Parent Category (if present)
- Voice Elements (Bitrate, Userlimit)
- Text Elements (Topic, NSFW, Slowmode)
- All permission overrides for Members/Roles
Possible
ErrorResponsescaused by the returnedRestActioninclude the following:MISSING_PERMISSIONS
The channel could not be created due to a permission discrepancyMISSING_ACCESS
TheVIEW_CHANNELpermission was removed
- Specified by:
createCopyin interfaceGuildChannel- Returns:
- A specific
ChannelAction
This action allows to set fields for the new GuildChannel before creating it!
-
-