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 specifiedGuildChannel
in the specifiedGuild
.int
getBitrate()
The audio bitrate of the voice audio that is transmitted in this channel.Region
getRegion()
TheRegion
of thisVoiceChannel
.java.lang.String
getRegionRaw()
The raw region name for thisVoiceChannel
.int
getUserLimit()
The maximum amount ofMembers
that can be in thisVoiceChannel
at 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 ofMembers
that can be in thisVoiceChannel
at 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()
TheRegion
of thisVoiceChannel
.
This will returnRegion.AUTOMATIC
if the region of this channel is set to Automatic.- Returns:
- the
Region
of 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:GuildChannel
Creates a copy of the specifiedGuildChannel
in 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
ErrorResponses
caused by the returnedRestAction
include the following:MISSING_PERMISSIONS
The channel could not be created due to a permission discrepancyMISSING_ACCESS
TheVIEW_CHANNEL
permission was removed
- Specified by:
createCopy
in interfaceGuildChannel
- Parameters:
guild
- TheGuild
to 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:GuildChannel
Creates 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
ErrorResponses
caused by the returnedRestAction
include the following:MISSING_PERMISSIONS
The channel could not be created due to a permission discrepancyMISSING_ACCESS
TheVIEW_CHANNEL
permission was removed
- Specified by:
createCopy
in interfaceGuildChannel
- Returns:
- A specific
ChannelAction
This action allows to set fields for the new GuildChannel before creating it!
-
-