Package net.dv8tion.jda.api.entities
Interface VoiceChannel
-
- All Superinterfaces:
Comparable<GuildChannel>
,GuildChannel
,ISnowflake
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.int
getUserLimit()
The maximum amount ofMembers
that can be in thisVoiceChannel
at once.-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface net.dv8tion.jda.api.entities.GuildChannel
createInvite, createPermissionOverride, delete, getGuild, getJDA, getManager, getMemberPermissionOverrides, getMembers, getName, getParent, getPermissionOverride, getPermissionOverrides, getPosition, getPositionRaw, getRolePermissionOverrides, getType, putPermissionOverride, retrieveInvites, upsertPermissionOverride
-
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
-
-
-
Method Detail
-
getUserLimit
int getUserLimit()
- 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.
-
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!
-
-