Class VoiceChannel
java.lang.Object
discord4j.core.object.entity.channel.VoiceChannel
- All Implemented Interfaces:
DiscordObject
,AudioChannel
,CategorizableChannel
,Channel
,GuildChannel
,GuildMessageChannel
,MessageChannel
,TopLevelGuildChannel
,TopLevelGuildMessageChannel
,Entity
A Discord voice channel.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Represents the various video quality modes.Nested classes/interfaces inherited from interface discord4j.core.object.entity.channel.Channel
Channel.Flag, Channel.Type
-
Constructor Summary
ConstructorDescriptionVoiceChannel
(GatewayDiscordClient gateway, discord4j.discordjson.json.ChannelData data) Constructs anVoiceChannel
with an associatedGatewayDiscordClient
and Discord data. -
Method Summary
Modifier and TypeMethodDescriptiondiscord4j.core.spec.VoiceChannelEditMono
edit()
Requests to edit this voice channel.edit
(discord4j.core.spec.VoiceChannelEditSpec spec) Requests to edit this voice channel.edit
(Consumer<? super LegacyVoiceChannelEditSpec> spec) Deprecated.final boolean
final GatewayDiscordClient
Returns theGatewayDiscordClient
that created this object.final discord4j.discordjson.json.ChannelData
getData()
Gets the raw data as represented by Discord.getEffectivePermissions
(Snowflake memberId) Gets the permissions for the given member, taking into account permission overwrites in this channel.getEffectivePermissions
(Member member) Gets the permissions for the given member, taking into account permission overwrites in this channel.final RestChannel
Return aRestChannel
handle to execute REST API operations on this entity.int
Gets the user limit of this voice channel.Gets the camera video quality mode of the voice channel.final int
hashCode()
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface discord4j.core.object.entity.channel.AudioChannel
getBitrate, getRtcRegion, getVoiceConnection, getVoiceStates, isMemberConnected, join, join, join, sendConnectVoiceState, sendDisconnectVoiceState
Methods inherited from interface discord4j.core.object.entity.channel.CategorizableChannel
createInvite, createInvite, createInvite, getCategory, getCategory, getCategoryId, getInvites, getRateLimitPerUser
Methods inherited from interface discord4j.core.object.entity.channel.Channel
delete, delete, getData, getId, getMention, getRestChannel, getType
Methods inherited from interface discord4j.core.object.DiscordObject
getClient
Methods inherited from interface discord4j.core.object.entity.channel.GuildChannel
getEffectivePermissions, getEffectivePermissions, getGuild, getGuild, getGuildId, getName
Methods inherited from interface discord4j.core.object.entity.channel.GuildMessageChannel
bulkDelete, bulkDeleteMessages, getMembers
Methods inherited from interface discord4j.core.object.entity.channel.MessageChannel
createEmbed, createEmbed, createMessage, createMessage, createMessage, createMessage, getLastMessage, getLastMessage, getLastMessageId, getLastPinTimestamp, getMessageById, getMessageById, getMessagesAfter, getMessagesBefore, getPinnedMessages, type, typeUntil
Methods inherited from interface discord4j.core.object.entity.channel.TopLevelGuildChannel
addMemberOverwrite, addMemberOverwrite, addRoleOverwrite, addRoleOverwrite, getOverwriteForMember, getOverwriteForRole, getPermissionOverwrites, getPosition, getRawPosition
Methods inherited from interface discord4j.core.object.entity.channel.TopLevelGuildMessageChannel
createWebhook, createWebhook, createWebhook, getJoinedPrivateArchivedThreads, getPrivateArchivedThreads, getPublicArchivedThreads, getTopic, getWebhooks, startThread
-
Constructor Details
-
VoiceChannel
Constructs anVoiceChannel
with an associatedGatewayDiscordClient
and Discord data.- Parameters:
gateway
- TheGatewayDiscordClient
associated to this object, must be non-null.data
- The raw data as represented by Discord, must be non-null.
-
-
Method Details
-
getUserLimit
public int getUserLimit()Gets the user limit of this voice channel.- Returns:
- The user limit of this voice channel.
-
getVideoQualityMode
Gets the camera video quality mode of the voice channel.- Returns:
- The camera video quality mode of the voice channel.
-
edit
Deprecated.useedit(VoiceChannelEditSpec)
oredit()
which offer an immutable approach to build specsRequests to edit a voice channel.- Parameters:
spec
- AConsumer
that provides a "blank"LegacyVoiceChannelEditSpec
to be operated on.- Returns:
- A
Mono
where, upon successful completion, emits the editedVoiceChannel
. If an error is received, it is emitted through theMono
.
-
edit
public discord4j.core.spec.VoiceChannelEditMono edit()Requests to edit this voice channel. Properties specifying how to edit this voice channel can be set via thewithXxx
methods of the returnedVoiceChannelEditMono
.- Returns:
- A
VoiceChannelEditMono
where, upon successful completion, emits the editedVoiceChannel
. If an error is received, it is emitted through theVoiceChannelEditMono
.
-
edit
Requests to edit this voice channel.- Parameters:
spec
- an immutable object that specifies how to edit this voice channel- Returns:
- A
Mono
where, upon successful completion, emits the editedVoiceChannel
. If an error is received, it is emitted through theMono
.
-
toString
-
getEffectivePermissions
Description copied from interface:GuildChannel
Gets the permissions for the given member, taking into account permission overwrites in this channel.- Specified by:
getEffectivePermissions
in interfaceGuildChannel
- Parameters:
memberId
- The ID of the member to get permissions for.- Returns:
- The permissions for the given member.
-
getEffectivePermissions
Description copied from interface:GuildChannel
Gets the permissions for the given member, taking into account permission overwrites in this channel.- Specified by:
getEffectivePermissions
in interfaceGuildChannel
- Parameters:
member
- The member to get permissions for.- Returns:
- The permissions for the given member.
-
getClient
Description copied from interface:DiscordObject
Returns theGatewayDiscordClient
that created this object. Methods in it are exclusively based on the entity cache orStore
in use. Refer to callinggetClient().rest()
to access aDiscordClient
that is capable of requesting entities directly from the REST API.- Specified by:
getClient
in interfaceDiscordObject
- Returns:
- The
GatewayDiscordClient
associated to this object.
-
getRestChannel
Description copied from interface:Channel
Return aRestChannel
handle to execute REST API operations on this entity.- Specified by:
getRestChannel
in interfaceChannel
-
getData
public final discord4j.discordjson.json.ChannelData getData()Description copied from interface:Channel
Gets the raw data as represented by Discord. -
equals
-
hashCode
public final int hashCode()
-
edit(VoiceChannelEditSpec)
oredit()
which offer an immutable approach to build specs