public class VoiceChannelJoinSpec extends Object implements Spec<Mono<VoiceConnection>>
VoiceChannel
and handle the initialization of the resulting
VoiceConnection
.Constructor and Description |
---|
VoiceChannelJoinSpec(ServiceMediator serviceMediator,
VoiceChannel voiceChannel) |
Modifier and Type | Method and Description |
---|---|
Mono<VoiceConnection> |
asRequest() |
VoiceChannelJoinSpec |
setProvider(AudioProvider provider)
Configure the
AudioProvider to use in the created VoiceConnection . |
VoiceChannelJoinSpec |
setReceiver(AudioReceiver receiver)
Deprecated.
Discord does not officially support bots receiving audio. It is not guaranteed that this
functionality works properly. Use at your own risk.
|
VoiceChannelJoinSpec |
setSelfDeaf(boolean selfDeaf)
Sets whether to deafen this client when establishing a
VoiceConnection . |
VoiceChannelJoinSpec |
setSelfMute(boolean selfMute)
Sets whether to mute this client when establishing a
VoiceConnection . |
public VoiceChannelJoinSpec(ServiceMediator serviceMediator, VoiceChannel voiceChannel)
public VoiceChannelJoinSpec setProvider(AudioProvider provider)
AudioProvider
to use in the created VoiceConnection
.provider
- Used to send audio.@Deprecated public VoiceChannelJoinSpec setReceiver(AudioReceiver receiver)
AudioReceiver
to use in the created VoiceConnection
.receiver
- Used to receive audio.public VoiceChannelJoinSpec setSelfDeaf(boolean selfDeaf)
VoiceConnection
.selfDeaf
- If this client is deafened.public VoiceChannelJoinSpec setSelfMute(boolean selfMute)
VoiceConnection
.selfMute
- If this client is muted.public Mono<VoiceConnection> asRequest()
asRequest
in interface Spec<Mono<VoiceConnection>>