VoiceReceiver

export declare class VoiceReceiver
export declare class VoiceReceiver
Attaches to a VoiceConnection, allowing you to receive audio packets from other users that are speaking.
constructor(voiceConnection)
Constructs a new instance of the VoiceReceiver class
NameTypeOptionalDescription
voiceConnectionVoiceConnectionNoNone
Readonly
speaking:SpeakingMap
The speaking map of the receiver.
Readonly
ssrcMap:SSRCMap
Maps SSRCs to Discord user ids.
Readonly
subscriptions:Map<string, AudioReceiveStream>
The current audio subscriptions of this receiver.
Readonly
voiceConnection:VoiceConnection
The attached connection of this receiver.
subscribe(target, options?):AudioReceiveStream
Creates a subscription for the given user id.
Returns
A readable stream of Opus packets received from the target
NameTypeOptionalDescription
targetstringNoThe id of the user to subscribe to
optionsPartial<AudioReceiveStreamOptions>YesNone