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
className | Type | Optional | Description |
---|---|---|---|
voiceConnection | VoiceConnection | No | None |
Readonly
The speaking map of the receiver.
Readonly
Maps SSRCs to Discord user ids.
Readonly
The current audio subscriptions of this receiver.
Readonly
The attached connection of this receiver.
Creates a subscription for the given user id.
Returns
A readable stream of Opus packets received from the targetName | Type | Optional | Description |
---|---|---|---|
target | string | No | The id of the user to subscribe to |
options | Partial<AudioReceiveStreamOptions> | Yes | None |