class VoiceReceiver

export declare class VoiceReceiver

Attaches to a VoiceConnection, allowing you to receive audio packets from other users that are speaking.

Constructors

constructor(
voiceConnection: VoiceConnection
)

Constructs a new instance of the VoiceReceiver class

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.

Creates a subscription for the given user id.

Returns: A readable stream of Opus packets received from the target