Package discord4j.voice
Interface VoiceConnectionFactory
- All Known Implementing Classes:
DefaultVoiceConnectionFactory
A factory to create
VoiceConnection
instances using a set of VoiceGatewayOptions
.-
Method Summary
Modifier and TypeMethodDescriptioncreate
(VoiceGatewayOptions options) Return aMono
that, upon subscription, is able to obtain aVoiceConnection
from the givenVoiceGatewayOptions
.
-
Method Details
-
create
Return aMono
that, upon subscription, is able to obtain aVoiceConnection
from the givenVoiceGatewayOptions
. The resulting connection can be an existing one if it's still active for a guild.- Parameters:
options
- the set of options to configure voice connections- Returns:
- a
Mono
that, upon subscription, can return aVoiceConnection
. In case an error occurs, it is emitted through theMono
.
-