public class DefaultVoiceConnectionFactory extends Object implements VoiceConnectionFactory
VoiceConnectionFactory
. It uses a DefaultVoiceGatewayClient
to create
VoiceConnection
instances. Protects against concurrent create(VoiceGatewayOptions)
calls by sharing
the Mono
subscription that actually establishes a voice connection.Constructor and Description |
---|
DefaultVoiceConnectionFactory() |
Modifier and Type | Method and Description |
---|---|
Mono<VoiceConnection> |
create(VoiceGatewayOptions options)
Return a
Mono that, upon subscription, is able to obtain a VoiceConnection from the given
VoiceGatewayOptions . |
public Mono<VoiceConnection> create(VoiceGatewayOptions options)
VoiceConnectionFactory
Mono
that, upon subscription, is able to obtain a VoiceConnection
from the given
VoiceGatewayOptions
. The resulting connection can be an existing one if it's still active for a guild.create
in interface VoiceConnectionFactory
options
- the set of options to configure voice connectionsMono
that, upon subscription, can return a VoiceConnection
. In case an error occurs,
it is emitted through the Mono
.