public interface VoiceConnection
Modifier and Type | Interface and Description |
---|---|
static class |
VoiceConnection.State
States of a voice connection.
|
Modifier and Type | Method and Description |
---|---|
Mono<Void> |
disconnect()
Disconnects this voice connection, tearing down existing resources associated with it.
|
Flux<VoiceGatewayEvent> |
events()
A sequence of
VoiceGatewayEvent received from the Voice Gateway session. |
Mono<Snowflake> |
getChannelId()
Return the current channel ID associated with this
VoiceConnection , if available from caching sources. |
Snowflake |
getGuildId()
Return the guild ID tied to this
VoiceConnection . |
default Mono<Boolean> |
isConnected()
Return whether this voice connection is currently in the
VoiceConnection.State.CONNECTED state. |
default Mono<VoiceConnection.State> |
onConnectOrDisconnect()
Return a
Mono that completes when this connection reaches a VoiceConnection.State.CONNECTED or
VoiceConnection.State.DISCONNECTED state. |
Mono<Void> |
reconnect()
Instruct a reconnect procedure on this voice connection.
|
Flux<VoiceConnection.State> |
stateEvents()
Return a sequence of the
VoiceConnection.State transitions this voice connection receives. |
Flux<VoiceGatewayEvent> events()
VoiceGatewayEvent
received from the Voice Gateway session.Flux
of VoiceGatewayEvent
default Mono<Boolean> isConnected()
VoiceConnection.State.CONNECTED
state.Mono
that, upon subscription, returns whether the current state is CONNECTEDdefault Mono<VoiceConnection.State> onConnectOrDisconnect()
Mono
that completes when this connection reaches a VoiceConnection.State.CONNECTED
or
VoiceConnection.State.DISCONNECTED
state. Only state transitions made after subscription are taken into account.Mono
that signals one of the CONNECTED or DISCONNECTED statesFlux<VoiceConnection.State> stateEvents()
VoiceConnection.State
transitions this voice connection receives.Flux
of VoiceConnection.State
elementsMono<Void> disconnect()
Mono
that, upon subscription, disconnects this voice connection. If an error occurrs, it is
emitted through the Mono
Snowflake getGuildId()
VoiceConnection
. Unlike getChannelId()
, this method returns
synchronously as voice connections are always bound to a single guild.Mono<Snowflake> getChannelId()
VoiceConnection
, if available from caching sources.
May return empty if no information is available.Mono
that, upon subscription, returns the channel ID this connection is currently pointing to,
if available