@Experimental public interface VoiceConnectionRegistry
VoiceConnection
instances.Modifier and Type | Method and Description |
---|---|
Mono<Void> |
disconnect(Snowflake guildId)
Disconnect a
VoiceConnection for given guildId and remove it from the registry. |
Mono<VoiceConnection> |
getVoiceConnection(Snowflake guildId)
Return the current
VoiceConnection this registry holds for a given guildId . |
Mono<Void> |
registerVoiceConnection(Snowflake guildId,
VoiceConnection voiceConnection)
Register a
VoiceConnection for a given guildId , replacing any existing one. |
Mono<VoiceConnection> getVoiceConnection(Snowflake guildId)
VoiceConnection
this registry holds for a given guildId
.guildId
- the guild ID to fetch the current voice connectionMono
of VoiceConnection
for the given guild if present, empty otherwise.Mono<Void> registerVoiceConnection(Snowflake guildId, VoiceConnection voiceConnection)
VoiceConnection
for a given guildId
, replacing any existing one.guildId
- the guild ID to set the new voice connectionvoiceConnection
- the VoiceConnection
to registerMono
indicating completion of the registration process, if an error happens it is emitted
through the Mono
.Mono<Void> disconnect(Snowflake guildId)
VoiceConnection
for given guildId
and remove it from the registry. If no connection
was present for the guild, this method does nothing.